11import { Request , Response } from 'express' ;
2- import { PrismaClient , OrganizationRole , OrganizationStatus , TennesseeRegion , OrganizationSize } from '@prisma/client' ;
2+ import {
3+ PrismaClient ,
4+ OrganizationRole ,
5+ OrganizationStatus ,
6+ TennesseeRegion ,
7+ OrganizationSize ,
8+ } from '@prisma/client' ;
39import { AuthenticatedRequest } from '../types/index.js' ;
410import admin from 'firebase-admin' ;
511
@@ -12,7 +18,8 @@ const prisma = new PrismaClient();
1218 */
1319export const getAllOrganizations = async ( req : AuthenticatedRequest , res : Response ) => {
1420 try {
15- const { search, status, role, city, state, tags, region, membershipActive, organizationType } = req . query ;
21+ const { search, status, role, city, state, tags, region, membershipActive, organizationType } =
22+ req . query ;
1623 const where : any = { } ;
1724 if ( search ) {
1825 where . OR = [
@@ -93,10 +100,20 @@ export const registerOrganization = async (req: Request, res: Response) => {
93100 tags,
94101 } = req . body ;
95102
96- if ( ! email || ! password || ! name || ! primaryContactName || ! primaryContactEmail || ! primaryContactPhone ) {
103+ if (
104+ ! email ||
105+ ! password ||
106+ ! name ||
107+ ! primaryContactName ||
108+ ! primaryContactEmail ||
109+ ! primaryContactPhone
110+ ) {
97111 return res
98112 . status ( 400 )
99- . json ( { error : 'Email, password, name, and primary contact information (name, email, phone) are required' } ) ;
113+ . json ( {
114+ error :
115+ 'Email, password, name, and primary contact information (name, email, phone) are required' ,
116+ } ) ;
100117 }
101118 const existingOrg = await prisma . organization . findFirst ( {
102119 where : {
0 commit comments