rez_core 5.0.271 → 5.0.273

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "5.0.271",
3
+ "version": "5.0.273",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -111,18 +111,38 @@ export class OrganizationService {
111
111
  return await this.organizationRepository.find({ where: { id } });
112
112
  }
113
113
 
114
- async update(
115
- id: number,
116
- organizationDto: Partial<OrganizationData>,
117
- manager?: EntityManager,
118
- ): Promise<OrganizationData | null> {
119
- const repo = manager
120
- ? manager.getRepository(OrganizationData)
121
- : this.organizationRepository;
114
+ // async update(
115
+ // id: number,
116
+ // organizationDto: Partial<OrganizationData>,
117
+ // // manager?: EntityManager,
118
+ // ): Promise<OrganizationData | null> {
119
+ // // const repo = manager
120
+ // // ? manager.getRepository(OrganizationData)
121
+ // // : this.organizationRepository;
122
122
 
123
- await repo.update(id, organizationDto);
124
- return await repo.findOne({ where: { id } });
125
- }
123
+ // const repo = this.organizationRepository;
124
+
125
+ // await repo.update(id, organizationDto);
126
+ // return await repo.findOne({ where: { id } });
127
+ // }
128
+
129
+ async update(
130
+ id: number,
131
+ organizationDto: Partial<OrganizationData>,
132
+ ): Promise<OrganizationData | null> {
133
+
134
+ const {
135
+ sessionToken,
136
+ appcode,
137
+ email_id,
138
+ level_id,
139
+ level_type,
140
+ ...dbData
141
+ } = organizationDto as any;
142
+
143
+ await this.organizationRepository.update(id, dbData);
144
+ return this.organizationRepository.findOne({ where: { id } });
145
+ }
126
146
 
127
147
  async remove(id: number, manager?: EntityManager): Promise<void> {
128
148
  const repo = manager