added basic error status
401 unauthorized
This commit is contained in:
		
							parent
							
								
									2c077dfa04
								
							
						
					
					
						commit
						8d344a4d00
					
				| @ -3,7 +3,7 @@ import { UserModel,UserDocument, toObject } from "@fosscord/server-util"; | |||||||
| import { getPublicUser } from "../../../util/User"; | import { getPublicUser } from "../../../util/User"; | ||||||
| import { HTTPError } from "lambert-server"; | import { HTTPError } from "lambert-server"; | ||||||
| import { UserUpdateSchema } from "../../../schema/User"; | import { UserUpdateSchema } from "../../../schema/User"; | ||||||
| import { check } from "../../../util/instanceOf"; | import { check, FieldErrors, Length } from "../../../util/instanceOf"; | ||||||
| import { db } from "@fosscord/server-util"; | import { db } from "@fosscord/server-util"; | ||||||
| import bcrypt from "bcrypt"; | import bcrypt from "bcrypt"; | ||||||
| const router = Router(); | const router = Router(); | ||||||
| @ -22,7 +22,8 @@ router.post("/", async (req: Request, res: Response) => { | |||||||
| 	res.sendStatus(204); | 	res.sendStatus(204); | ||||||
| 	} | 	} | ||||||
| 	else{ | 	else{ | ||||||
| 		res.sendStatus(204);	 | 		res.sendStatus(401); | ||||||
|  | 
 | ||||||
| 	} | 	} | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Bloom Sirenix
						Bloom Sirenix