MCPcopy Create free account
hub / github.com/SOS-RS/backend / find

Method find

src/users/users.controller.ts:149–161  ·  view source on GitHub ↗
(@Param('field') field: string, @Param('value') value: string)

Source from the content-addressed store, hash-verified

147
148 @Get('find/:field/:value')
149 async find(@Param('field') field: string, @Param('value') value: string) {
150 try {
151 const result = await this.userServices.checkIfUserExists({
152 [field]: value,
153 });
154 return new ServerResponse(201, 'Successfully searched user', {
155 exists: result,
156 });
157 } catch (err: any) {
158 this.logger.error(`Failed to find user: ${err}`);
159 throw new HttpException(err?.code ?? err?.name ?? `${err}`, 400);
160 }
161 }
162}

Callers

nothing calls this directly

Calls 1

checkIfUserExistsMethod · 0.80

Tested by

no test coverage detected