Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit d5dc7ca

Browse files
update code to match prod
1 parent b4cd25d commit d5dc7ca

File tree

2 files changed

+12
-35
lines changed

2 files changed

+12
-35
lines changed

docs/swagger.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ paths:
7777
required: false
7878
type: "string"
7979
format: "UUID"
80+
- name: "externalProfile.externalId"
81+
in: "query"
82+
description: "Filter by the user's external profile's external id"
83+
required: false
84+
type: "string"
85+
format: "UUID"
86+
- name: "externalProfile.organizationId"
87+
in: "query"
88+
description: "Filter by the user's organization id"
89+
required: false
90+
type: "string"
91+
format: "UUID"
8092
responses:
8193
"200":
8294
description: "OK - the request was successful"

src/modules/organizationSkillsProvider/service.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,40 +42,6 @@ create.schema = {
4242
auth: joi.object()
4343
}
4444

45-
/**
46-
* patch device by id
47-
* @param id the device id
48-
* @param entity the request device entity
49-
* @param auth the auth object
50-
* @param params the query params
51-
* @return {Promise} the updated device
52-
*/
53-
async function patch (id, entity, auth, params) {
54-
if (entity.organizationId) {
55-
await dbHelper.get(Organization, entity.organizationId)
56-
}
57-
if (entity.skillProviderId) {
58-
await dbHelper.get(SkillsProvider, entity.skillProviderId)
59-
}
60-
61-
await dbHelper.makeSureUnique(OrganizationSkillsProvider, entity, uniqueFields, params)
62-
63-
const newEntity = await dbHelper.update(OrganizationSkillsProvider, id, entity, auth, params)
64-
await serviceHelper.patchRecordInEs(resource, newEntity.dataValues)
65-
66-
return newEntity
67-
}
68-
69-
patch.schema = {
70-
id: joi.string(),
71-
entity: {
72-
organizationId: joi.string(),
73-
skillProviderId: joi.string()
74-
},
75-
auth: joi.object(),
76-
params: joi.object()
77-
}
78-
7945
/**
8046
* get device by id
8147
* @param id the device id
@@ -149,7 +115,6 @@ async function remove (id, auth, params) {
149115
module.exports = {
150116
create,
151117
search,
152-
patch,
153118
get,
154119
remove
155120
}

0 commit comments

Comments
 (0)