Update userprofile.html

This commit is contained in:
xfarrow
2025-03-24 12:18:05 +01:00
parent d005193f63
commit 836fc822a9
9 changed files with 262 additions and 829 deletions

View File

@ -5,7 +5,7 @@
{
"type": "http",
"name": "ActivatePerson",
"seq": 1,
"seq": 26,
"request": {
"url": "http://localhost:3000/api/people/me/activation?q=3ac9c204de1676b54163ed8015c7af00",
"method": "GET",
@ -21,6 +21,14 @@
"enabled": true
}
],
"params": [
{
"name": "q",
"value": "3ac9c204de1676b54163ed8015c7af00",
"type": "query",
"enabled": true
}
],
"body": {
"mode": "json",
"json": "",
@ -33,20 +41,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": [
{
"name": "q",
"value": "3ac9c204de1676b54163ed8015c7af00",
"enabled": true
}
]
}
}
},
{
"type": "http",
"name": "AddOrganizationAdmin",
"seq": 2,
"seq": 12,
"request": {
"url": "http://localhost:3000/api/organizations/1/admins",
"method": "POST",
@ -62,6 +63,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"personId\" : \"2\"\n}",
@ -74,18 +76,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "ChangeApplicationStatus",
"seq": 3,
"seq": 7,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/applications/5",
"method": "PATCH",
"headers": [],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"status\": \"ACCEPTED\"\n}",
@ -98,18 +100,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "CreateApplication",
"seq": 4,
"seq": 10,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/1/applications",
"method": "POST",
"headers": [],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -121,14 +123,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "CreateJobOffer",
"seq": 5,
"seq": 6,
"request": {
"url": "http://localhost:3000/api/organizations/1/joboffers",
"method": "POST",
@ -144,6 +145,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"title\" : \"NodeJS developer\",\n \"description\" : \"We are looking for NodeJS developers which can help us build Blink\",\n \"salaryFrequency\": \"YEARLY\",\n \"salary\": [20000, 23000],\n \"salaryCurrency\": \"EUR\",\n \"location\" : \"Rome\",\n \"remote\": \"PARTIALLY\",\n \"contractType\": \"PART-TIME\",\n \"tags\" : [\"javascript\"]\n}",
@ -156,14 +158,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "CreateOrganization",
"seq": 6,
"seq": 16,
"request": {
"url": "http://localhost:3000/api/organizations",
"method": "POST",
@ -179,6 +180,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"name\" : \"Blink Inc.\",\n \"location\" : \"Napoli, 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.\"\n}",
@ -191,18 +193,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "DeleteApplication",
"seq": 7,
"seq": 9,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/applications/6",
"method": "DELETE",
"headers": [],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"jobApplicationId\": 1\n}",
@ -215,18 +217,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "DeleteContactInfo",
"seq": 28,
"seq": 18,
"request": {
"url": "http://localhost:3000/api/people/contactinfos/2",
"method": "DELETE",
"headers": [],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -238,43 +240,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
},
{
"type": "http",
"name": "DeleteJobOffer",
"seq": 8,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/3",
"method": "DELETE",
"headers": [
{
"name": "User-Agent",
"value": "insomnia/2023.5.8",
"enabled": true
}
],
"body": {
"mode": "none",
"formUrlEncoded": [],
"multipartForm": []
},
"script": {},
"vars": {},
"assertions": [],
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "DeleteOrganization",
"seq": 9,
"seq": 13,
"request": {
"url": "http://localhost:3000/api/organizations/1",
"method": "DELETE",
@ -285,6 +257,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -296,14 +269,42 @@
"tests": "",
"auth": {
"mode": "none"
}
}
},
{
"type": "http",
"name": "DeleteJobOffer",
"seq": 5,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/3",
"method": "DELETE",
"headers": [
{
"name": "User-Agent",
"value": "insomnia/2023.5.8",
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
"multipartForm": []
},
"query": []
"script": {},
"vars": {},
"assertions": [],
"tests": "",
"auth": {
"mode": "none"
}
}
},
{
"type": "http",
"name": "DeletePerson",
"seq": 10,
"seq": 20,
"request": {
"url": "http://localhost:3000/api/people/me",
"method": "DELETE",
@ -314,6 +315,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -325,14 +327,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "FilterOrganizationByPrefix",
"seq": 11,
"seq": 1,
"request": {
"url": "http://localhost:3000/api/organizations/filter",
"method": "POST",
@ -348,6 +349,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"name\" : \"bli\"\n}",
@ -360,18 +362,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetApplicantsByJobOffer",
"seq": 12,
"seq": 2,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/1/applications",
"method": "GET",
"headers": [],
"params": [],
"body": {
"mode": "json",
"json": "",
@ -384,18 +386,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetApplicantsByOrganization",
"seq": 13,
"seq": 3,
"request": {
"url": "http://localhost:3000/api/organizations/1/joboffers/applications",
"method": "GET",
"headers": [],
"params": [],
"body": {
"mode": "json",
"json": "",
@ -408,18 +410,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetContactInfosByPerson",
"seq": 27,
"seq": 17,
"request": {
"url": "http://localhost:3000/api/people/1/contactinfos",
"method": "GET",
"headers": [],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -431,14 +433,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetJobOffers",
"seq": 14,
"seq": 4,
"request": {
"url": "http://localhost:3000/api/organizations/1/joboffers/",
"method": "GET",
@ -449,6 +450,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -460,18 +462,18 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetMyApplications",
"seq": 15,
"seq": 8,
"request": {
"url": "http://localhost:3000/api/organizations/joboffers/applications/mine",
"method": "GET",
"headers": [],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -483,14 +485,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetMyself",
"seq": 16,
"seq": 21,
"request": {
"url": "http://localhost:3000/api/people/me",
"method": "GET",
@ -501,6 +502,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -512,14 +514,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetOrganization",
"seq": 17,
"seq": 15,
"request": {
"url": "http://localhost:3000/api/organizations/1",
"method": "GET",
@ -530,6 +531,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -541,14 +543,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "GetPerson",
"seq": 18,
"seq": 22,
"request": {
"url": "http://localhost:3000/api/people/1/details",
"method": "GET",
@ -559,6 +560,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -570,8 +572,7 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
@ -582,6 +583,7 @@
"url": "http://localhost:3000/people/myself/contactinfos",
"method": "POST",
"headers": [],
"params": [],
"body": {
"mode": "none",
"formUrlEncoded": [],
@ -593,14 +595,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "Login",
"seq": 20,
"seq": 27,
"request": {
"url": "http://localhost:3000/api/people/me/token",
"method": "POST",
@ -616,6 +617,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"email\": \"john@mail.org\",\n \"password\": \"password\"\n}",
@ -628,14 +630,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "Register",
"seq": 21,
"seq": 28,
"request": {
"url": "http://localhost:3000/api/people",
"method": "POST",
@ -651,6 +652,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"email\" : \"john@mail.org\",\n \"password\" : \"password\",\n \"displayName\" : \"John Doe\",\n \"aboutMe\" : \"I am a passionate software engineer\",\n \"qualification\" : \"Software Engineer\"\n}",
@ -663,14 +665,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "RemoveOrganizationAdmin",
"seq": 23,
"seq": 11,
"request": {
"url": "http://localhost:3000/api/organizations/1/admins/me",
"method": "DELETE",
@ -686,6 +687,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "",
@ -698,49 +700,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
},
{
"type": "http",
"name": "RequestNewPassword",
"seq": 22,
"request": {
"url": "http://localhost:3000/api/resetpassword/request",
"method": "POST",
"headers": [
{
"name": "Content-Type",
"value": "application/json",
"enabled": true
},
{
"name": "User-Agent",
"value": "insomnia/2023.5.8",
"enabled": true
}
],
"body": {
"mode": "json",
"json": "{\n \"email\": \"john@mail.org\"\n}",
"formUrlEncoded": [],
"multipartForm": []
},
"script": {},
"vars": {},
"assertions": [],
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "ResetNewPassword",
"seq": 24,
"seq": 23,
"request": {
"url": "http://localhost:3000/api/resetpassword/reset",
"method": "POST",
@ -756,6 +722,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"secret\": \"360837853e2d3cf799c709b44720b4e3\",\n \"password\": \"password\"\n}",
@ -768,14 +735,48 @@
"tests": "",
"auth": {
"mode": "none"
}
}
},
{
"type": "http",
"name": "RequestNewPassword",
"seq": 24,
"request": {
"url": "http://localhost:3000/api/resetpassword/request",
"method": "POST",
"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 \"email\": \"john@mail.org\"\n}",
"formUrlEncoded": [],
"multipartForm": []
},
"query": []
"script": {},
"vars": {},
"assertions": [],
"tests": "",
"auth": {
"mode": "none"
}
}
},
{
"type": "http",
"name": "UpdateOrganization",
"seq": 25,
"seq": 14,
"request": {
"url": "http://localhost:3000/api/organizations/1",
"method": "PATCH",
@ -791,6 +792,7 @@
"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}",
@ -803,14 +805,13 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{
"type": "http",
"name": "UpdatePerson",
"seq": 26,
"seq": 25,
"request": {
"url": "http://localhost:3000/api/people/me",
"method": "PATCH",
@ -826,6 +827,7 @@
"enabled": true
}
],
"params": [],
"body": {
"mode": "json",
"json": "{\n \"displayName\": \"John Junior Doe III\",\n \"dateOfBirth\": \"1970-01-01\",\n \"openToWork\": \"false\",\n \"placeOfLiving\": \"Oslo, Norway\",\n \"aboutMe\": \"I am a passionate software engineer, but I also love art and music\",\n \"new_password\": \"password\",\n \"old_password\": \"password\",\n \"qualification\" : \"Software Engineer at Blink Inc. & Google LLC\",\n \"visibility\": \"EVERYONE\",\n \"oldPassword\": \"password\",\n \"newPassword\": \"password\"\n}",
@ -838,8 +840,7 @@
"tests": "",
"auth": {
"mode": "none"
},
"query": []
}
}
},
{

View File

@ -1,614 +0,0 @@
{
"info": {
"name": "Blink",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "ActivatePerson",
"event": [],
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/people/me/activation?q=3ac9c204de1676b54163ed8015c7af00",
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "AddOrganizationAdmin",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/1/admins",
"body": {
"mode": "raw",
"raw": "{\n \"personId\" : \"2\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "ChangeApplicationStatus",
"event": [],
"request": {
"method": "PATCH",
"header": [],
"url": "http://localhost:3000/api/organizations/joboffers/applications/5",
"body": {
"mode": "raw",
"raw": "{\n \"status\": \"ACCEPTED\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "CreateApplication",
"event": [],
"request": {
"method": "POST",
"header": [],
"url": "http://localhost:3000/api/organizations/joboffers/1/applications"
}
},
{
"name": "CreateJobOffer",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/1/joboffers",
"body": {
"mode": "raw",
"raw": "{\n \"title\" : \"NodeJS developer\",\n \"description\" : \"We are looking for NodeJS developers which can help us build Blink\",\n \"salaryFrequency\": \"YEARLY\",\n \"salary\": [20000, 23000],\n \"salaryCurrency\": \"EUR\",\n \"location\" : \"Rome\",\n \"remote\": \"PARTIALLY\",\n \"contractType\": \"PART-TIME\",\n \"tags\" : [\"javascript\"]\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "CreateOrganization",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations",
"body": {
"mode": "raw",
"raw": "{\n \"name\" : \"Blink Inc.\",\n \"location\" : \"Napoli, 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.\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "DeleteApplication",
"event": [],
"request": {
"method": "DELETE",
"header": [],
"url": "http://localhost:3000/api/organizations/joboffers/applications/6",
"body": {
"mode": "raw",
"raw": "{\n \"jobApplicationId\": 1\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "DeleteContactInfo",
"event": [],
"request": {
"method": "DELETE",
"header": [],
"url": "http://localhost:3000/api/people/contactinfos/2"
}
},
{
"name": "DeleteJobOffer",
"event": [],
"request": {
"method": "DELETE",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/joboffers/3"
}
},
{
"name": "DeleteOrganization",
"event": [],
"request": {
"method": "DELETE",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/1"
}
},
{
"name": "DeletePerson",
"event": [],
"request": {
"method": "DELETE",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/people/me"
}
},
{
"name": "FilterOrganizationByPrefix",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/filter",
"body": {
"mode": "raw",
"raw": "{\n\t\"name\" : \"bli\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "GetApplicantsByJobOffer",
"event": [],
"request": {
"method": "GET",
"header": [],
"url": "http://localhost:3000/api/organizations/joboffers/1/applications",
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "GetApplicantsByOrganization",
"event": [],
"request": {
"method": "GET",
"header": [],
"url": "http://localhost:3000/api/organizations/1/joboffers/applications",
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "GetContactInfosByPerson",
"event": [],
"request": {
"method": "GET",
"header": [],
"url": "http://localhost:3000/api/people/1/contactinfos"
}
},
{
"name": "GetJobOffers",
"event": [],
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/1/joboffers/"
}
},
{
"name": "GetMyApplications",
"event": [],
"request": {
"method": "GET",
"header": [],
"url": "http://localhost:3000/api/organizations/joboffers/applications/mine"
}
},
{
"name": "GetMyself",
"event": [],
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/people/me"
}
},
{
"name": "GetOrganization",
"event": [],
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/organizations/1"
}
},
{
"name": "GetPerson",
"event": [],
"request": {
"method": "GET",
"header": [
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/people/1/details"
}
},
{
"name": "InsertContactInfo",
"event": [],
"request": {
"method": "POST",
"header": [],
"url": "http://localhost:3000/people/myself/contactinfos"
}
},
{
"name": "Login",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/people/me/token",
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"john@mail.org\",\n \"password\": \"password\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "Register",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/people",
"body": {
"mode": "raw",
"raw": "{\n \"email\" : \"john@mail.org\",\n \"password\" : \"password\",\n \"displayName\" : \"John Doe\",\n \"aboutMe\" : \"I am a passionate software engineer\",\n \"qualification\" : \"Software Engineer\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"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"
}
],
"url": "http://localhost:3000/api/organizations/1/admins/me",
"body": {
"mode": "raw",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "RequestNewPassword",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/resetpassword/request",
"body": {
"mode": "raw",
"raw": "{\n \"email\": \"john@mail.org\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "ResetNewPassword",
"event": [],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"value": "application/json",
"disabled": false,
"type": "default"
},
{
"key": "User-Agent",
"value": "insomnia/2023.5.8",
"disabled": false,
"type": "default"
}
],
"url": "http://localhost:3000/api/resetpassword/reset",
"body": {
"mode": "raw",
"raw": "{\n \"secret\": \"360837853e2d3cf799c709b44720b4e3\",\n \"password\": \"password\"\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"
}
],
"url": "http://localhost:3000/api/organizations/1",
"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": [],
"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"
}
],
"url": "http://localhost:3000/api/people/me",
"body": {
"mode": "raw",
"raw": "{\n \"displayName\": \"John Junior Doe III\",\n \"dateOfBirth\": \"1970-01-01\",\n \"openToWork\": \"false\",\n \"placeOfLiving\": \"Oslo, Norway\",\n \"aboutMe\": \"I am a passionate software engineer, but I also love art and music\",\n \"new_password\": \"password\",\n \"old_password\": \"password\",\n \"qualification\" : \"Software Engineer at Blink Inc. & Google LLC\",\n \"visibility\": \"EVERYONE\",\n \"oldPassword\": \"password\",\n \"newPassword\": \"password\"\n}",
"options": {
"raw": {
"language": "json"
}
}
}
}
},
{
"name": "bruno",
"event": []
},
{
"name": "bruno",
"item": []
}
],
"variable": []
}

View File

@ -51,14 +51,14 @@ app.use(rateLimiter); // Apply the rate limiter middleware to all routes
===== BEGIN ROUTE HANDLING =====
*/
app.use('/api/server', serverRoutes.routes);
app.use('/api/people', personRoutes.publicRoutes); // TODO: Change in "/people". Idk why I chose "persons"
app.use('/api/people', personRoutes.protectedRoutes); // TODO: Change in "/people". Idk why I chose "persons"
app.use('/api/people', personRoutes.publicRoutes);
app.use('/api/people', personRoutes.protectedRoutes);
app.use('/api/organizations', organizationRoutes.routes);
app.use('/api/organizations', jobOffersRoutes.routes);
app.use('/api/organizations', organizationAdminRoutes.routes);
app.use('/api/resetpassword', resetPasswordRoutes.routes);
app.use('/api/organizations', applicationRoutes.routes);
app.use('/api/persons', personContactInfosRoutes.routes); // TODO: Change in "/people". Idk why I chose "persons"
app.use('/api/people', personContactInfosRoutes.routes);
/*
===== END ROUTE HANDLING =====

View File

@ -18,7 +18,7 @@ const PersonContactInfo = require('../models/person_contact_info_model');
async function insert(req, res) {
try {
const contactInfo = await PersonContactInfo.insert(req.jwt.person_id, req.body.content, req.body.info_type);
res.set('Location', `/api/persons/${req.jwt.person_id}/contactinfos/${contactInfo.id}`);
res.set('Location', `/api/people/${req.jwt.person_id}/contactinfos/${contactInfo.id}`);
return res.status(201).json(contactInfo);
} catch (error) {
console.error(`Error in function ${insert.name}: ${error}`);