1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

added basic error status

401 unauthorized
This commit is contained in:
Bloom Sirenix 2021-05-23 04:51:02 +02:00
parent 2c077dfa04
commit 8d344a4d00

View File

@ -3,7 +3,7 @@ import { UserModel,UserDocument, toObject } from "@fosscord/server-util";
import { getPublicUser } from "../../../util/User";
import { HTTPError } from "lambert-server";
import { UserUpdateSchema } from "../../../schema/User";
import { check } from "../../../util/instanceOf";
import { check, FieldErrors, Length } from "../../../util/instanceOf";
import { db } from "@fosscord/server-util";
import bcrypt from "bcrypt";
const router = Router();
@ -22,7 +22,8 @@ router.post("/", async (req: Request, res: Response) => {
res.sendStatus(204);
}
else{
res.sendStatus(204);
res.sendStatus(401);
}
});