This commit is contained in:
2024-06-17 18:19:05 +05:00
parent a46547d1fe
commit 6e4401219e
10 changed files with 34 additions and 37 deletions
+3 -1
View File
@@ -7,7 +7,7 @@ import Token from "../models/Token";
const router = Router();
router.post("/", async (req, res) => {
const { username, password } = req.body;
let { username, password } = req.body;
if (!username || !password) {
return res.json({
@@ -15,6 +15,8 @@ router.post("/", async (req, res) => {
});
}
username = username.toLowerCase();
const user = await User.findOne({ username });
if (!user) {
-2
View File
@@ -76,8 +76,6 @@ router.get("/:buildId", async (req, res) => {
router.post("/", async (req, res) => {
const { buildId, startAt, client, duration } = req.body;
console.log("client", client);
if (!buildId || !startAt) {
return res.json({
status: "error",