This commit is contained in:
xfarrow 2024-10-17 17:11:56 +02:00
parent ca5e201dc4
commit 10aa3460a3
2 changed files with 6 additions and 5 deletions

View File

@ -23,8 +23,8 @@ const createOrganizationValidator = [
check('location').trim().escape().isLength({ check('location').trim().escape().isLength({
max: 256 max: 256
}), }),
check('description').trim().escape(), check('description').optional().trim().escape(),
check('is_hiring').isBoolean() check('isHiring').optional().isBoolean()
]; ];
const updateOrganizationValidator = [ const updateOrganizationValidator = [
@ -34,8 +34,8 @@ const updateOrganizationValidator = [
check('location').trim().escape().isLength({ check('location').trim().escape().isLength({
max: 256 max: 256
}), }),
check('description').trim().escape(), check('description').optional().trim().escape(),
check('is_hiring').optional().isBoolean() check('isHiring').optional().isBoolean()
]; ];
const deleteOrGetOrganizationValidator = [ const deleteOrGetOrganizationValidator = [

View File

@ -31,7 +31,8 @@ CREATE TABLE IF NOT EXISTS "Organization" (
id SERIAL PRIMARY KEY, id SERIAL PRIMARY KEY,
name CHARACTER VARYING(128) NOT NULL, name CHARACTER VARYING(128) NOT NULL,
location CHARACTER VARYING, location CHARACTER VARYING,
description TEXT description TEXT,
is_hiring BOOLEAN
); );
-- Table: OrganizationAdministrator -- Table: OrganizationAdministrator