Updates to documentation, fixes for edit buttons in map shifts, and CORS for local dev and access

This commit is contained in:
2025-09-05 12:23:46 -06:00
parent 87767b07e2
commit 0ed0c4b38d
60 changed files with 1432 additions and 508 deletions

View File

@@ -287,7 +287,7 @@ class ShiftsController {
// Admin: Create shift
async create(req, res) {
try {
const { title, description, date, startTime, endTime, location, maxVolunteers } = req.body;
const { title, description, date, startTime, endTime, location, maxVolunteers, isPublic } = req.body;
if (!title || !date || !startTime || !endTime || !location || !maxVolunteers) {
return res.status(400).json({
@@ -306,6 +306,7 @@ class ShiftsController {
'Max Volunteers': parseInt(maxVolunteers),
'Current Volunteers': 0,
Status: 'Open',
'Is Public': isPublic !== false, // Default to true if not specified
'Created By': req.session.userEmail,
'Created At': new Date().toISOString(),
'Updated At': new Date().toISOString()
@@ -340,7 +341,8 @@ class ShiftsController {
endTime: 'End Time',
location: 'Location',
maxVolunteers: 'Max Volunteers',
status: 'Status'
status: 'Status',
isPublic: 'Is Public'
};
for (const [key, field] of Object.entries(fieldMap)) {