diff --git a/backend/apis/nodejs/src/utils/validators/organization_validator.js b/backend/apis/nodejs/src/utils/validators/organization_validator.js index 4afe80c..d38cddf 100644 --- a/backend/apis/nodejs/src/utils/validators/organization_validator.js +++ b/backend/apis/nodejs/src/utils/validators/organization_validator.js @@ -23,8 +23,8 @@ const createOrganizationValidator = [ check('location').trim().escape().isLength({ max: 256 }), - check('description').trim().escape(), - check('is_hiring').isBoolean() + check('description').optional().trim().escape(), + check('isHiring').optional().isBoolean() ]; const updateOrganizationValidator = [ @@ -34,8 +34,8 @@ const updateOrganizationValidator = [ check('location').trim().escape().isLength({ max: 256 }), - check('description').trim().escape(), - check('is_hiring').optional().isBoolean() + check('description').optional().trim().escape(), + check('isHiring').optional().isBoolean() ]; const deleteOrGetOrganizationValidator = [ diff --git a/backend/sql/1-create_tables.sql b/backend/sql/1-create_tables.sql index 85ef5c4..b66bdec 100644 --- a/backend/sql/1-create_tables.sql +++ b/backend/sql/1-create_tables.sql @@ -31,7 +31,8 @@ CREATE TABLE IF NOT EXISTS "Organization" ( id SERIAL PRIMARY KEY, name CHARACTER VARYING(128) NOT NULL, location CHARACTER VARYING, - description TEXT + description TEXT, + is_hiring BOOLEAN ); -- Table: OrganizationAdministrator