mirror of
				https://github.com/xfarrow/blink
				synced 2025-06-27 09:03:02 +02:00 
			
		
		
		
	bugfixes
This commit is contained in:
		| @@ -71,7 +71,7 @@ async function removeOrganizationAdmin(personId, organizationId) { | ||||
|     .where('id_organization', organizationId) | ||||
|     .del(); | ||||
|  | ||||
|   // TODO: If the user instead deletes their entire profile, the organization will not be deleted. Fix. (database schema) | ||||
|   // TODO: If the user instead deletes their entire profile, the organization will not be deleted. Fix. | ||||
|   const remainingAdministrators = await transaction('OrganizationAdministrator') | ||||
|     .where({ | ||||
|       id_organization: organizationId | ||||
|   | ||||
| @@ -11,6 +11,19 @@ | ||||
|     IN THE SOFTWARE. | ||||
| */ | ||||
|  | ||||
| /****************************************************************************** | ||||
|  *                                 ⚠ WARNING ⚠                                 | ||||
|  *  | ||||
|  *  | ||||
|  * Posts are now scheduled to be developed at a later stage in the development | ||||
|  * process, with the possibility that it may not be developed at all. | ||||
|  * I am unsure whether it is a good thing or it'll only be used to | ||||
|  * flood timelines with low-effort content, like other competing platforms. | ||||
|  *  | ||||
|  *  | ||||
|  *  | ||||
|  ******************************************************************************/ | ||||
|  | ||||
| const organizationPostModel = require('../models/organization_post_model'); | ||||
| const express = require('express'); | ||||
| const jwtUtils = require('../utils/middleware_utils'); | ||||
|   | ||||
| @@ -28,7 +28,7 @@ const organizationValidator = require('../utils/validators/organization_validato | ||||
| async function createOrganization(req, res) { | ||||
|  | ||||
|   try { | ||||
|     const errors = organizationValidator.createOrganizationValidator(req); | ||||
|     const errors = organizationValidator.validationResult(req); | ||||
|     if (!errors.isEmpty()) { | ||||
|       return res.status(400).json({ | ||||
|         errors: errors.array() | ||||
| @@ -53,7 +53,7 @@ async function createOrganization(req, res) { | ||||
|  * Required field(s): none. | ||||
|  */ | ||||
| async function updateOrganization(req, res) { | ||||
|   const errors = organizationValidator.createOrganizationValidator(req); | ||||
|   const errors = organizationValidator.validationResult(req); | ||||
|   if (!errors.isEmpty()) { | ||||
|     return res.status(400).json({ | ||||
|       errors: errors.array() | ||||
| @@ -109,7 +109,7 @@ async function updateOrganization(req, res) { | ||||
|  */ | ||||
| async function deleteOrganization(req, res) { | ||||
|   try { | ||||
|     const errors = organizationValidator.createOrganizationValidator(req); | ||||
|     const errors = organizationValidator.validationResult(req); | ||||
|     if (!errors.isEmpty()) { | ||||
|       return res.status(400).json({ | ||||
|         errors: errors.array() | ||||
| @@ -141,7 +141,7 @@ async function deleteOrganization(req, res) { | ||||
|  */ | ||||
| async function getOrganization(req, res) { | ||||
|   try { | ||||
|     const errors = organizationValidator.createOrganizationValidator(req); | ||||
|     const errors = organizationValidator.validationResult(req); | ||||
|     if (!errors.isEmpty()) { | ||||
|       return res.status(400).json({ | ||||
|         errors: errors.array() | ||||
|   | ||||
| @@ -17,7 +17,7 @@ const { | ||||
| } = require("express-validator"); | ||||
|  | ||||
| const addOrganizationAdminValidator = [ | ||||
|     check('id').trim().notEmpty().escape(), | ||||
|     check('person_id').trim().notEmpty().escape(), | ||||
|     check('organizationId').trim().notEmpty().escape() | ||||
| ]; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user