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

@ -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}`);