upd
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user