Skip to content

Commit

Permalink
Merge pull request #199 from souravbhowmik1999/UserData
Browse files Browse the repository at this point in the history
User: Update user data field value
  • Loading branch information
Sourav-Tekdi authored Jun 5, 2024
2 parents 94fddfc + c1a4882 commit 4e8b71e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/adapters/postgres/user-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,14 @@ export class PostgresUserService implements IServicelocator {

if (Array.isArray(data.value) === true) {
let dataArray = [];
for (let value of data.value) {
dataArray.push(value);
}
data.value = dataArray.join(',');
}

let result = await this.fieldsValueRepository.update({ itemId, fieldId: data.fieldId }, { value: data.value });
let newResult;

if (result.affected === 0) {
newResult = await this.fieldsValueRepository.save({
itemId,
Expand Down

0 comments on commit 4e8b71e

Please sign in to comment.