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

Commit 0d2de55

Browse files
#24 - Link skill provider with org
1 parent 9bf182e commit 0d2de55

File tree

11 files changed

+469
-43
lines changed

11 files changed

+469
-43
lines changed

docs/UBahn_API.postman_collection.json

Lines changed: 184 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "5c139c1e-e3f2-4002-a278-e03c7b7dc97d",
3+
"_postman_id": "66538223-0d2c-42f0-a3e0-cccc51c21b4f",
44
"name": "UBahn_API",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
@@ -14,7 +14,7 @@
1414
{
1515
"listen": "test",
1616
"script": {
17-
"id": "ba04f45f-dbdf-4398-9750-3eae3161dedf",
17+
"id": "05164ddd-c806-4bad-aea0-1bfd6e43e82c",
1818
"exec": [
1919
"var rsp = pm.response.json();",
2020
"if(rsp.id) pm.environment.set(\"userId\", rsp.id);"
@@ -67,7 +67,7 @@
6767
{
6868
"listen": "test",
6969
"script": {
70-
"id": "64aeda82-1df8-41c7-80c9-d5cf8423fdf9",
70+
"id": "df73daae-0b9d-4381-a261-07b1ebc7eccc",
7171
"exec": [
7272
"var rsp = pm.response.json();",
7373
"if(rsp.id) pm.environment.set(\"userId\", rsp.id);"
@@ -123,7 +123,7 @@
123123
{
124124
"listen": "test",
125125
"script": {
126-
"id": "e4f1d08d-a9b5-4efe-b3d9-67d3111608c1",
126+
"id": "b37624d4-9657-4dad-9ddf-2d383a8e6d0d",
127127
"exec": [
128128
"var rsp = pm.response.json();",
129129
"if(rsp.id) pm.environment.set(\"userId\", rsp.id);"
@@ -481,7 +481,7 @@
481481
{
482482
"listen": "test",
483483
"script": {
484-
"id": "816c38da-3158-4d9d-828e-bb0644178a98",
484+
"id": "dff9ccbc-34d7-47c1-9ceb-48d7472e693d",
485485
"exec": [
486486
"var rsp = pm.response.json();",
487487
"if(rsp.id) pm.environment.set(\"roleId\", rsp.id);"
@@ -716,7 +716,7 @@
716716
{
717717
"listen": "test",
718718
"script": {
719-
"id": "7671acab-f1f8-4c29-9824-f1f2bd570028",
719+
"id": "cce4f7a5-d16c-4bb4-bb46-e8e519f9ec11",
720720
"exec": [
721721
""
722722
],
@@ -958,7 +958,7 @@
958958
{
959959
"listen": "test",
960960
"script": {
961-
"id": "5b67a6ba-63b6-4991-a5ea-d881ea802083",
961+
"id": "d6b690ec-4b75-4a8f-9099-16464365f51f",
962962
"exec": [
963963
"var rsp = pm.response.json();",
964964
"if(rsp.id) pm.environment.set(\"organizationId\", rsp.id);"
@@ -1193,7 +1193,7 @@
11931193
{
11941194
"listen": "test",
11951195
"script": {
1196-
"id": "88d7b18f-c5e1-4577-9d03-a93d9f9d5c7e",
1196+
"id": "e401a38a-b4cb-4b5b-8fdd-24e91249f6ff",
11971197
"exec": [
11981198
"var rsp = pm.response.json();",
11991199
"if(rsp.id) pm.environment.set(\"skillsProviderId\", rsp.id);"
@@ -1428,7 +1428,7 @@
14281428
{
14291429
"listen": "test",
14301430
"script": {
1431-
"id": "92b83849-961d-4ad3-bac2-d7f457e5fbd7",
1431+
"id": "a4db0fe1-638f-4d8d-81c8-08967498d1de",
14321432
"exec": [
14331433
"var rsp = pm.response.json();",
14341434
"if(rsp.id) pm.environment.set(\"skillId\", rsp.id);"
@@ -1664,7 +1664,7 @@
16641664
{
16651665
"listen": "test",
16661666
"script": {
1667-
"id": "d5c59be3-63df-485b-a889-aa4d00c90571",
1667+
"id": "95226f08-c8a4-4915-91bb-8018ba933ac3",
16681668
"exec": [
16691669
""
16701670
],
@@ -1912,7 +1912,7 @@
19121912
{
19131913
"listen": "test",
19141914
"script": {
1915-
"id": "d8143ed1-b600-4ef3-845c-396ed909e821",
1915+
"id": "63cd9db1-0910-4834-a3a6-519a8e2bea9f",
19161916
"exec": [
19171917
""
19181918
],
@@ -2160,7 +2160,7 @@
21602160
{
21612161
"listen": "test",
21622162
"script": {
2163-
"id": "6c13436d-c2ee-4867-98ac-eb513e9edb3e",
2163+
"id": "b6c6134f-a0af-4f0e-b5b2-90c6c2409491",
21642164
"exec": [
21652165
"var rsp = pm.response.json();",
21662166
"if(rsp.id) pm.environment.set(\"achievementsProviderId\", rsp.id);"
@@ -2395,7 +2395,7 @@
23952395
{
23962396
"listen": "test",
23972397
"script": {
2398-
"id": "4453dd7e-65fc-47c0-9081-7a78a6ed1446",
2398+
"id": "33ed1f80-a4b5-4984-89b4-4c53836b9966",
23992399
"exec": [
24002400
""
24012401
],
@@ -2644,7 +2644,7 @@
26442644
{
26452645
"listen": "test",
26462646
"script": {
2647-
"id": "d34d4953-a1f9-41ef-a9dd-6fa7c9431c3f",
2647+
"id": "a0d7915e-0e12-4108-bf56-5d4767c03974",
26482648
"exec": [
26492649
"var rsp = pm.response.json();",
26502650
"if (rsp.id) pm.environment.set(\"attributeGroupId\", rsp.id);"
@@ -2885,7 +2885,7 @@
28852885
{
28862886
"listen": "test",
28872887
"script": {
2888-
"id": "71539226-1b42-4aa3-9f51-d5b488c817d2",
2888+
"id": "d6d57cb8-63a2-4778-b1e2-4dbc361aee0f",
28892889
"exec": [
28902890
"var rsp = pm.response.json();",
28912891
"if (rsp.id) pm.environment.set(\"attributeId\", rsp.id);"
@@ -3125,7 +3125,7 @@
31253125
{
31263126
"listen": "test",
31273127
"script": {
3128-
"id": "5c987711-36d9-4472-b6d0-db4edc47685e",
3128+
"id": "0da60ea8-92b2-43e4-985a-4a507b26b59a",
31293129
"exec": [
31303130
""
31313131
],
@@ -3404,6 +3404,174 @@
34043404
}
34053405
],
34063406
"protocolProfileBehavior": {}
3407+
},
3408+
{
3409+
"name": "organizationSkillsProvider",
3410+
"item": [
3411+
{
3412+
"name": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3413+
"request": {
3414+
"method": "GET",
3415+
"header": [
3416+
{
3417+
"key": "Authorization",
3418+
"value": "Bearer {{token}}",
3419+
"type": "text"
3420+
}
3421+
],
3422+
"url": {
3423+
"raw": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3424+
"host": [
3425+
"{{HOST}}"
3426+
],
3427+
"path": [
3428+
"organizations",
3429+
"{{organizationId}}",
3430+
"skillProviders"
3431+
]
3432+
}
3433+
},
3434+
"response": []
3435+
},
3436+
{
3437+
"name": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3438+
"request": {
3439+
"method": "HEAD",
3440+
"header": [
3441+
{
3442+
"key": "Authorization",
3443+
"value": "Bearer {{token}}",
3444+
"type": "text"
3445+
}
3446+
],
3447+
"url": {
3448+
"raw": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3449+
"host": [
3450+
"{{HOST}}"
3451+
],
3452+
"path": [
3453+
"organizations",
3454+
"{{organizationId}}",
3455+
"skillProviders"
3456+
]
3457+
}
3458+
},
3459+
"response": []
3460+
},
3461+
{
3462+
"name": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3463+
"request": {
3464+
"method": "POST",
3465+
"header": [
3466+
{
3467+
"key": "Authorization",
3468+
"value": "Bearer {{token}}",
3469+
"type": "text"
3470+
}
3471+
],
3472+
"body": {
3473+
"mode": "raw",
3474+
"raw": "{\n \"skillProviderId\": \"{{skillsProviderId}}\"\n}",
3475+
"options": {
3476+
"raw": {
3477+
"language": "json"
3478+
}
3479+
}
3480+
},
3481+
"url": {
3482+
"raw": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3483+
"host": [
3484+
"{{HOST}}"
3485+
],
3486+
"path": [
3487+
"organizations",
3488+
"{{organizationId}}",
3489+
"skillProviders"
3490+
]
3491+
}
3492+
},
3493+
"response": []
3494+
},
3495+
{
3496+
"name": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3497+
"request": {
3498+
"method": "GET",
3499+
"header": [
3500+
{
3501+
"key": "Authorization",
3502+
"value": "Bearer {{token}}",
3503+
"type": "text"
3504+
}
3505+
],
3506+
"url": {
3507+
"raw": "{{HOST}}/organizations/{{organizationId}}/skillProviders/{{skillsProviderId}}",
3508+
"host": [
3509+
"{{HOST}}"
3510+
],
3511+
"path": [
3512+
"organizations",
3513+
"{{organizationId}}",
3514+
"skillProviders",
3515+
"{{skillsProviderId}}"
3516+
]
3517+
}
3518+
},
3519+
"response": []
3520+
},
3521+
{
3522+
"name": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3523+
"request": {
3524+
"method": "HEAD",
3525+
"header": [
3526+
{
3527+
"key": "Authorization",
3528+
"value": "Bearer {{token}}",
3529+
"type": "text"
3530+
}
3531+
],
3532+
"url": {
3533+
"raw": "{{HOST}}/organizations/{{organizationId}}/skillProviders/{{skillsProviderId}}",
3534+
"host": [
3535+
"{{HOST}}"
3536+
],
3537+
"path": [
3538+
"organizations",
3539+
"{{organizationId}}",
3540+
"skillProviders",
3541+
"{{skillsProviderId}}"
3542+
]
3543+
}
3544+
},
3545+
"response": []
3546+
},
3547+
{
3548+
"name": "{{HOST}}/organizations/{{organizationId}}/skillProviders",
3549+
"request": {
3550+
"method": "DELETE",
3551+
"header": [
3552+
{
3553+
"key": "Authorization",
3554+
"value": "Bearer {{token}}",
3555+
"type": "text"
3556+
}
3557+
],
3558+
"url": {
3559+
"raw": "{{HOST}}/organizations/{{organizationId}}/skillProviders/{{skillsProviderId}}",
3560+
"host": [
3561+
"{{HOST}}"
3562+
],
3563+
"path": [
3564+
"organizations",
3565+
"{{organizationId}}",
3566+
"skillProviders",
3567+
"{{skillsProviderId}}"
3568+
]
3569+
}
3570+
},
3571+
"response": []
3572+
}
3573+
],
3574+
"protocolProfileBehavior": {}
34073575
}
34083576
],
34093577
"protocolProfileBehavior": {}
Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
2-
"id": "5ceec1fa-02fe-4556-be97-40e279ad003a",
2+
"id": "1f07c3cc-5af9-4dc1-b038-129aaf1fac6e",
33
"name": "UBahn_ENV",
44
"values": [
55
{
66
"key": "HOST",
7-
"value": "http://127.0.0.1:3001/api/1.0",
7+
"value": "http://127.0.0.1:3002/api/1.0",
88
"enabled": true
99
},
1010
{
1111
"key": "token",
12-
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLmNvbSIsImhhbmRsZSI6InRjLXVzZXIiLCJleHAiOjE2ODU1NzE0NjAsInVzZXJJZCI6IjIzMTY2NzY2IiwiaWF0IjoxNTg1NTcwODYwLCJlbWFpbCI6InRjLXVzZXJAZ21haWwuY29tIiwianRpIjoiMGYxZWYxZDMtMmIzMy00OTAwLWJiNDMtNDhmMjI4NWY5NjI3In0.eBhXqSBe8zMRg2nBeGeZDgKiJdAYs0zOMzGfJCjWfcs",
12+
"value": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIiwiQ29waWxvdCIsIkFkbWluIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLmNvbSIsImhhbmRsZSI6InRjLUFkbWluIiwiZXhwIjoxNjg1NTcxNDYwLCJ1c2VySWQiOiIyMzE2Njc2OCIsImlhdCI6MTU4NTU3MDg2MCwiZW1haWwiOiJ0Yy1BZG1pbkBnbWFpbC5jb20iLCJqdGkiOiIwZjFlZjFkMy0yYjMzLTQ5MDAtYmI0My00OGYyMjg1Zjk2MzAifQ.D_TtClF4xkuSPSWoUYvkWigUWVFhH5UuF7Eci4S1_xg",
1313
"enabled": true
1414
},
1515
{
1616
"key": "userId",
17-
"value": "ce348067-e73f-49d7-af72-fcf11a6c88bf",
17+
"value": "55f6fa1c-fc38-4b74-83ad-278babd7efd2",
1818
"enabled": true
1919
},
2020
{
@@ -24,36 +24,21 @@
2424
},
2525
{
2626
"key": "skillsProviderId",
27-
"value": "",
27+
"value": "7637ae1a-3b7c-44eb-a5ed-10ea02f1885d",
2828
"enabled": true
2929
},
3030
{
3131
"key": "skillId",
32-
"value": "",
32+
"value": "e72e432f-6ef4-4f19-962b-eb59b805b317",
3333
"enabled": true
3434
},
3535
{
3636
"key": "organizationId",
3737
"value": "36ed815b-3da1-49f1-a043-aaed0a4e81ad",
3838
"enabled": true
39-
},
40-
{
41-
"key": "achievementsProviderId",
42-
"value": "eb327c00-0090-45af-96d2-593408c96397",
43-
"enabled": true
44-
},
45-
{
46-
"key": "attributeGroupId",
47-
"value": "84634bbd-8191-40cf-a03e-9962d7e39fda",
48-
"enabled": true
49-
},
50-
{
51-
"key": "attributeId",
52-
"value": "f3fd623f-a613-4e3c-bf2f-9df529ff4317",
53-
"enabled": true
5439
}
5540
],
5641
"_postman_variable_scope": "environment",
57-
"_postman_exported_at": "2020-05-13T08:36:10.472Z",
58-
"_postman_exported_using": "Postman/7.24.0"
42+
"_postman_exported_at": "2020-08-02T07:47:16.803Z",
43+
"_postman_exported_using": "Postman/7.29.1"
5944
}

scripts/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ const modelToESIndexMapping = {
7777
AchievementsProvider: 'achievementprovider',
7878
AttributeGroup: 'attributegroup',
7979
Attribute: 'attribute',
80-
UserAttribute: 'userattribute'
80+
UserAttribute: 'userattribute',
81+
OrganizationSkillsProvider: 'organizationskillprovider'
8182
}
8283

8384
module.exports = {

0 commit comments

Comments
 (0)