diff --git a/backend/apis/BlinkApiUsageExampleBRUNO.json b/backend/apis/BlinkApiUsageExampleBRUNO.json index a25574f..5f9535f 100644 --- a/backend/apis/BlinkApiUsageExampleBRUNO.json +++ b/backend/apis/BlinkApiUsageExampleBRUNO.json @@ -5,7 +5,7 @@ { "type": "http", "name": "ActivatePerson", - "seq": 22, + "seq": 23, "request": { "url": "http://localhost:3000/api/persons/me/activation?q=3ac9c204de1676b54163ed8015c7af00", "method": "GET", @@ -33,14 +33,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "none" + "mode": "inherit" } } }, { "type": "http", "name": "AddOrganizationAdmin", - "seq": 10, + "seq": 11, "request": { "url": "http://localhost:3000/api/organizations/1/admins", "method": "POST", @@ -68,10 +68,7 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTUxNjAzMCwiZXhwIjoxNzI5NTQ0ODMwfQ.jWVfSL_D4pabdihXDfoZ1dPLy4Nn6C3aePHIommiHqw" - } + "mode": "inherit" } } }, @@ -80,7 +77,7 @@ "name": "ChangeApplicationStatus", "seq": 1, "request": { - "url": "http://localhost:3000/api/organizations/joboffers/applications/2", + "url": "http://localhost:3000/api/organizations/joboffers/applications/5", "method": "PATCH", "headers": [], "params": [], @@ -95,19 +92,16 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTczMDEyNTUzNywiZXhwIjoxNzMwMTU0MzM3fQ.X216UkLuDL6-Qs6EUbIRL_YKQKKcxyzQFmAKzJNWEzI" - } + "mode": "inherit" } } }, { "type": "http", "name": "CreateApplication", - "seq": 4, + "seq": 6, "request": { - "url": "http://localhost:3000/api/organizations/joboffers/1", + "url": "http://localhost:3000/api/organizations/joboffers/1/applications", "method": "POST", "headers": [], "params": [], @@ -121,17 +115,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTczMDEyNTUzNywiZXhwIjoxNzMwMTU0MzM3fQ.X216UkLuDL6-Qs6EUbIRL_YKQKKcxyzQFmAKzJNWEzI" - } + "mode": "inherit" } } }, { "type": "http", "name": "CreateJobOffer", - "seq": 8, + "seq": 9, "request": { "url": "http://localhost:3000/api/organizations/1/joboffers", "method": "POST", @@ -159,17 +150,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTc3NDc4NywiZXhwIjoxNzI5ODAzNTg3fQ.Li0NeQH6e4ykQ8tpY3KYkS_bQhv7cIFmjz96U-E9S0c" - } + "mode": "inherit" } } }, { "type": "http", "name": "CreateOrganization", - "seq": 15, + "seq": 16, "request": { "url": "http://localhost:3000/api/organizations", "method": "POST", @@ -197,10 +185,7 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTc3NDc4NywiZXhwIjoxNzI5ODAzNTg3fQ.Li0NeQH6e4ykQ8tpY3KYkS_bQhv7cIFmjz96U-E9S0c" - } + "mode": "inherit" } } }, @@ -209,7 +194,7 @@ "name": "DeleteApplication", "seq": 2, "request": { - "url": "http://localhost:3000/api/organizations/joboffers/applications/2", + "url": "http://localhost:3000/api/organizations/joboffers/applications/6", "method": "DELETE", "headers": [], "params": [], @@ -224,17 +209,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTczMDEyODc2NSwiZXhwIjoxNzMwMTU3NTY1fQ.puQ4gw9K_fL4FhXs7UlvyZwq98XZEIuXwnZ0JBIXzaw" - } + "mode": "inherit" } } }, { "type": "http", "name": "DeleteJobOffer", - "seq": 6, + "seq": 7, "request": { "url": "http://localhost:3000/api/organizations/joboffers/3", "method": "DELETE", @@ -256,17 +238,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTc2NDI0NiwiZXhwIjoxNzI5NzkzMDQ2fQ.TOZMas9WujFp_hP7bqFzbSqWighmT7NmfkohEmpWr5A" - } + "mode": "inherit" } } }, { "type": "http", "name": "DeleteOrganization", - "seq": 12, + "seq": 13, "request": { "url": "http://localhost:3000/api/organizations/1", "method": "DELETE", @@ -288,17 +267,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjIsImlhdCI6MTcxMTAzMjk1NCwiZXhwIjoxNzExMDYxNzU0fQ.5el1ymu9qZQpoJpWfM4ZPfNcs34GGFc6WVfCBitlyEk" - } + "mode": "inherit" } } }, { "type": "http", "name": "DeletePerson", - "seq": 18, + "seq": 19, "request": { "url": "http://localhost:3000/api/persons/me", "method": "DELETE", @@ -320,17 +296,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjIsImlhdCI6MTcxMTAzMjk1NCwiZXhwIjoxNzExMDYxNzU0fQ.5el1ymu9qZQpoJpWfM4ZPfNcs34GGFc6WVfCBitlyEk" - } + "mode": "inherit" } } }, { "type": "http", "name": "FilterOrganizationByPrefix", - "seq": 11, + "seq": 12, "request": { "url": "http://localhost:3000/api/organizations/filter", "method": "POST", @@ -365,15 +338,15 @@ { "type": "http", "name": "GetApplicantsByOrganization", - "seq": 3, + "seq": 4, "request": { - "url": "http://localhost:3000/api/organizations/1", + "url": "http://localhost:3000/api/organizations/1/joboffers/applications", "method": "GET", "headers": [], "params": [], "body": { "mode": "json", - "json": "{\n \"organizationId\": 1\n}", + "json": "", "formUrlEncoded": [], "multipartForm": [] }, @@ -382,17 +355,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTczMDEyNTUzNywiZXhwIjoxNzMwMTU0MzM3fQ.X216UkLuDL6-Qs6EUbIRL_YKQKKcxyzQFmAKzJNWEzI" - } + "mode": "inherit" } } }, { "type": "http", "name": "GetJobOffers", - "seq": 7, + "seq": 8, "request": { "url": "http://localhost:3000/api/organizations/1/joboffers/", "method": "GET", @@ -423,7 +393,7 @@ "name": "GetMyApplications", "seq": 5, "request": { - "url": "http://localhost:3000/api/organizations/applications/mine", + "url": "http://localhost:3000/api/organizations/joboffers/applications/mine", "method": "GET", "headers": [], "params": [], @@ -437,17 +407,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTczMDEyNTUzNywiZXhwIjoxNzMwMTU0MzM3fQ.X216UkLuDL6-Qs6EUbIRL_YKQKKcxyzQFmAKzJNWEzI" - } + "mode": "inherit" } } }, { "type": "http", "name": "GetMyself", - "seq": 20, + "seq": 21, "request": { "url": "http://localhost:3000/api/persons/me", "method": "GET", @@ -469,17 +436,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTUxNTY3NywiZXhwIjoxNzI5NTQ0NDc3fQ.OxlOKzzZpl2H8cxjPP_8vsD5LRBi-ZxDplvQf63jMkk" - } + "mode": "inherit" } } }, { "type": "http", "name": "GetOrganization", - "seq": 14, + "seq": 15, "request": { "url": "http://localhost:3000/api/organizations/1", "method": "GET", @@ -508,7 +472,7 @@ { "type": "http", "name": "GetPerson", - "seq": 21, + "seq": 22, "request": { "url": "http://localhost:3000/api/persons/1/details", "method": "GET", @@ -537,7 +501,7 @@ { "type": "http", "name": "Login", - "seq": 23, + "seq": 24, "request": { "url": "http://localhost:3000/api/persons/me/token", "method": "POST", @@ -565,52 +529,14 @@ "assertions": [], "tests": "", "auth": { - "mode": "none" - } - } - }, - { - "type": "http", - "name": "RemoveOrganizationAdmin", - "seq": 9, - "request": { - "url": "http://localhost:3000/api/organizations/1/admins/me", - "method": "DELETE", - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "enabled": true - }, - { - "name": "User-Agent", - "value": "insomnia/2023.5.8", - "enabled": true - } - ], - "params": [], - "body": { - "mode": "json", - "json": "", - "formUrlEncoded": [], - "multipartForm": [] - }, - "script": {}, - "vars": {}, - "assertions": [], - "tests": "", - "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjIsImlhdCI6MTcyOTUxNjM0NywiZXhwIjoxNzI5NTQ1MTQ3fQ.W09-xjGYSVI2EftoI9lSJAkzlo3V1NADcv4RbhE414I" - } + "mode": "inherit" } } }, { "type": "http", "name": "Register", - "seq": 24, + "seq": 25, "request": { "url": "http://localhost:3000/api/persons", "method": "POST", @@ -638,17 +564,49 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "" + "mode": "none" + } + } + }, + { + "type": "http", + "name": "RemoveOrganizationAdmin", + "seq": 10, + "request": { + "url": "http://localhost:3000/api/organizations/1/admins/me", + "method": "DELETE", + "headers": [ + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "User-Agent", + "value": "insomnia/2023.5.8", + "enabled": true } + ], + "params": [], + "body": { + "mode": "json", + "json": "", + "formUrlEncoded": [], + "multipartForm": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "auth": { + "mode": "inherit" } } }, { "type": "http", "name": "RequestNewPassword", - "seq": 17, + "seq": 18, "request": { "url": "http://localhost:3000/api/resetpassword/request", "method": "POST", @@ -680,48 +638,10 @@ } } }, - { - "type": "http", - "name": "UpdateOrganization", - "seq": 13, - "request": { - "url": "http://localhost:3000/api/organizations/1", - "method": "PATCH", - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "enabled": true - }, - { - "name": "User-Agent", - "value": "insomnia/2023.5.8", - "enabled": true - } - ], - "params": [], - "body": { - "mode": "json", - "json": "{\n \"name\": \"Blink Inc.\",\n \"location\": \"Naples (Campania), Italy\",\n \"description\": \"Blink is a privacy-respecting business-oriented social media platform focused on fostering connections between businesses and individuals, propelling careers and sparking innovation in the professional world. Think of it as an open-source alternative to LinkedIn.\"\n}", - "formUrlEncoded": [], - "multipartForm": [] - }, - "script": {}, - "vars": {}, - "assertions": [], - "tests": "", - "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTUxNjAzMCwiZXhwIjoxNzI5NTQ0ODMwfQ.jWVfSL_D4pabdihXDfoZ1dPLy4Nn6C3aePHIommiHqw" - } - } - } - }, { "type": "http", "name": "ResetNewPassword", - "seq": 16, + "seq": 17, "request": { "url": "http://localhost:3000/api/resetpassword/reset", "method": "POST", @@ -753,10 +673,45 @@ } } }, + { + "type": "http", + "name": "UpdateOrganization", + "seq": 14, + "request": { + "url": "http://localhost:3000/api/organizations/1", + "method": "PATCH", + "headers": [ + { + "name": "Content-Type", + "value": "application/json", + "enabled": true + }, + { + "name": "User-Agent", + "value": "insomnia/2023.5.8", + "enabled": true + } + ], + "params": [], + "body": { + "mode": "json", + "json": "{\n \"name\": \"Blink Inc.\",\n \"location\": \"Naples (Campania), Italy\",\n \"description\": \"Blink is a privacy-respecting business-oriented social media platform focused on fostering connections between businesses and individuals, propelling careers and sparking innovation in the professional world. Think of it as an open-source alternative to LinkedIn.\"\n}", + "formUrlEncoded": [], + "multipartForm": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "auth": { + "mode": "inherit" + } + } + }, { "type": "http", "name": "UpdatePerson", - "seq": 19, + "seq": 20, "request": { "url": "http://localhost:3000/api/persons/me", "method": "PATCH", @@ -784,15 +739,46 @@ "assertions": [], "tests": "", "auth": { - "mode": "bearer", - "bearer": { - "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTcyOTUxNTY3NywiZXhwIjoxNzI5NTQ0NDc3fQ.OxlOKzzZpl2H8cxjPP_8vsD5LRBi-ZxDplvQf63jMkk" - } + "mode": "inherit" + } + } + }, + { + "type": "http", + "name": "GetApplicantsByJobOffer", + "seq": 3, + "request": { + "url": "http://localhost:3000/api/organizations/joboffers/1/applications", + "method": "GET", + "headers": [], + "params": [], + "body": { + "mode": "json", + "json": "", + "formUrlEncoded": [], + "multipartForm": [] + }, + "script": {}, + "vars": {}, + "assertions": [], + "tests": "", + "auth": { + "mode": "inherit" } } } ], "environments": [], + "root": { + "request": { + "auth": { + "mode": "bearer", + "bearer": { + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwZXJzb25faWQiOjEsImlhdCI6MTczMDI5ODY0NywiZXhwIjoxNzMwMzI3NDQ3fQ.Quqwib7DasUSmWwLPpaCLQscBna_jNs-P0u2QW12lgA" + } + } + } + }, "brunoConfig": { "version": "1", "name": "Blink", diff --git a/backend/apis/BlinkApiUsageExamplePOSTMAN.json b/backend/apis/BlinkApiUsageExamplePOSTMAN.json index 2f43ac8..5bd0f89 100644 --- a/backend/apis/BlinkApiUsageExamplePOSTMAN.json +++ b/backend/apis/BlinkApiUsageExamplePOSTMAN.json @@ -24,13 +24,20 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons/me/activation?q=3ac9c204de1676b54163ed8015c7af00", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons", + "me", + "activation" ], - "path": [], "query": [], "variable": [] }, @@ -63,13 +70,20 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/1/admins", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1", + "admins" ], - "path": [], "query": [], "variable": [] }, @@ -94,13 +108,21 @@ "request": { "method": "PATCH", "header": [], + "auth": null, "description": "", "url": { - "raw": "http://localhost:3000/api/organizations/joboffers/applications/2", + "raw": "http://localhost:3000/api/organizations/joboffers/applications/5", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "joboffers", + "applications", + "5" ], - "path": [], "query": [], "variable": [] }, @@ -121,13 +143,21 @@ "request": { "method": "POST", "header": [], + "auth": null, "description": "", "url": { - "raw": "http://localhost:3000/api/organizations/joboffers/1", + "raw": "http://localhost:3000/api/organizations/joboffers/1/applications", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "joboffers", + "1", + "applications" ], - "path": [], "query": [], "variable": [] } @@ -152,13 +182,20 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/1/joboffers", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1", + "joboffers" ], - "path": [], "query": [], "variable": [] }, @@ -192,13 +229,18 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations" ], - "path": [], "query": [], "variable": [] }, @@ -219,13 +261,21 @@ "request": { "method": "DELETE", "header": [], + "auth": null, "description": "", "url": { - "raw": "http://localhost:3000/api/organizations/joboffers/applications/2", + "raw": "http://localhost:3000/api/organizations/joboffers/applications/6", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "joboffers", + "applications", + "6" ], - "path": [], "query": [], "variable": [] }, @@ -253,13 +303,20 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/joboffers/3", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "joboffers", + "3" ], - "path": [], "query": [], "variable": [] } @@ -278,13 +335,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/1", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1" ], - "path": [], "query": [], "variable": [] } @@ -303,13 +366,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons/me", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons", + "me" ], - "path": [], "query": [], "variable": [] } @@ -334,13 +403,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/filter", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "filter" ], - "path": [], "query": [], "variable": [] }, @@ -361,19 +436,26 @@ "request": { "method": "GET", "header": [], + "auth": null, "description": "", "url": { - "raw": "http://localhost:3000/api/organizations/1", + "raw": "http://localhost:3000/api/organizations/1/joboffers/applications", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1", + "joboffers", + "applications" ], - "path": [], "query": [], "variable": [] }, "body": { "mode": "raw", - "raw": "{\n \"organizationId\": 1\n}", "options": { "raw": { "language": "json" @@ -395,13 +477,21 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/1/joboffers/", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1", + "joboffers", + "" ], - "path": [], "query": [], "variable": [] } @@ -413,13 +503,21 @@ "request": { "method": "GET", "header": [], + "auth": null, "description": "", "url": { - "raw": "http://localhost:3000/api/organizations/applications/mine", + "raw": "http://localhost:3000/api/organizations/joboffers/applications/mine", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "joboffers", + "applications", + "mine" ], - "path": [], "query": [], "variable": [] } @@ -438,13 +536,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons/me", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons", + "me" ], - "path": [], "query": [], "variable": [] } @@ -463,13 +567,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/organizations/1", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1" ], - "path": [], "query": [], "variable": [] } @@ -488,13 +598,20 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons/1/details", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons", + "1", + "details" ], - "path": [], "query": [], "variable": [] } @@ -519,13 +636,20 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons/me/token", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons", + "me", + "token" ], - "path": [], "query": [], "variable": [] }, @@ -540,45 +664,6 @@ } } }, - { - "name": "RemoveOrganizationAdmin", - "event": [], - "request": { - "method": "DELETE", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "disabled": false, - "type": "default" - }, - { - "key": "User-Agent", - "value": "insomnia/2023.5.8", - "disabled": false, - "type": "default" - } - ], - "description": "", - "url": { - "raw": "http://localhost:3000/api/organizations/1/admins/me", - "host": [ - "localhost" - ], - "path": [], - "query": [], - "variable": [] - }, - "body": { - "mode": "raw", - "options": { - "raw": { - "language": "json" - } - } - } - } - }, { "name": "Register", "event": [], @@ -598,13 +683,18 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons" ], - "path": [], "query": [], "variable": [] }, @@ -619,6 +709,53 @@ } } }, + { + "name": "RemoveOrganizationAdmin", + "event": [], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "disabled": false, + "type": "default" + }, + { + "key": "User-Agent", + "value": "insomnia/2023.5.8", + "disabled": false, + "type": "default" + } + ], + "auth": null, + "description": "", + "url": { + "raw": "http://localhost:3000/api/organizations/1/admins/me", + "protocol": "http", + "host": [ + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1", + "admins", + "me" + ], + "query": [], + "variable": [] + }, + "body": { + "mode": "raw", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, { "name": "RequestNewPassword", "event": [], @@ -638,59 +775,25 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/resetpassword/request", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "resetpassword", + "request" ], - "path": [], "query": [], "variable": [] }, "body": { "mode": "raw", - "raw": "{\n\t\"email\": \"john@mail.org\"\n}", - "options": { - "raw": { - "language": "json" - } - } - } - } - }, - { - "name": "UpdateOrganization", - "event": [], - "request": { - "method": "PATCH", - "header": [ - { - "key": "Content-Type", - "value": "application/json", - "disabled": false, - "type": "default" - }, - { - "key": "User-Agent", - "value": "insomnia/2023.5.8", - "disabled": false, - "type": "default" - } - ], - "description": "", - "url": { - "raw": "http://localhost:3000/api/organizations/1", - "host": [ - "localhost" - ], - "path": [], - "query": [], - "variable": [] - }, - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Blink Inc.\",\n \"location\": \"Naples (Campania), Italy\",\n \"description\": \"Blink is a privacy-respecting business-oriented social media platform focused on fostering connections between businesses and individuals, propelling careers and sparking innovation in the professional world. Think of it as an open-source alternative to LinkedIn.\"\n}", + "raw": "{\n \"email\": \"john@mail.org\"\n}", "options": { "raw": { "language": "json" @@ -718,13 +821,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/resetpassword/reset", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "resetpassword", + "reset" ], - "path": [], "query": [], "variable": [] }, @@ -739,6 +848,52 @@ } } }, + { + "name": "UpdateOrganization", + "event": [], + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json", + "disabled": false, + "type": "default" + }, + { + "key": "User-Agent", + "value": "insomnia/2023.5.8", + "disabled": false, + "type": "default" + } + ], + "auth": null, + "description": "", + "url": { + "raw": "http://localhost:3000/api/organizations/1", + "protocol": "http", + "host": [ + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "1" + ], + "query": [], + "variable": [] + }, + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Blink Inc.\",\n \"location\": \"Naples (Campania), Italy\",\n \"description\": \"Blink is a privacy-respecting business-oriented social media platform focused on fostering connections between businesses and individuals, propelling careers and sparking innovation in the professional world. Think of it as an open-source alternative to LinkedIn.\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, { "name": "UpdatePerson", "event": [], @@ -758,13 +913,19 @@ "type": "default" } ], + "auth": null, "description": "", "url": { "raw": "http://localhost:3000/api/persons/me", + "protocol": "http", "host": [ - "localhost" + "localhost:3000" + ], + "path": [ + "api", + "persons", + "me" ], - "path": [], "query": [], "variable": [] }, @@ -778,6 +939,40 @@ } } } + }, + { + "name": "GetApplicantsByJobOffer", + "event": [], + "request": { + "method": "GET", + "header": [], + "auth": null, + "description": "", + "url": { + "raw": "http://localhost:3000/api/organizations/joboffers/1/applications", + "protocol": "http", + "host": [ + "localhost:3000" + ], + "path": [ + "api", + "organizations", + "joboffers", + "1", + "applications" + ], + "query": [], + "variable": [] + }, + "body": { + "mode": "raw", + "options": { + "raw": { + "language": "json" + } + } + } + } } ], "variable": [] diff --git a/backend/apis/nodejs/src/routes/job_application_routes.js b/backend/apis/nodejs/src/routes/job_application_routes.js index c494417..653eb63 100644 --- a/backend/apis/nodejs/src/routes/job_application_routes.js +++ b/backend/apis/nodejs/src/routes/job_application_routes.js @@ -1,4 +1,3 @@ -// TODO: Create a validator /* This code is part of Blink licensed under GPLv3