Update Drafting.ts
This commit is contained in:
parent
3ca15c2170
commit
47f0eaa6a6
|
@ -31,7 +31,7 @@ App.post("/create",
|
||||||
VocalsDifficulty: j.number().required().min(0).max(6)
|
VocalsDifficulty: j.number().required().min(0).max(6)
|
||||||
})),
|
})),
|
||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
if (req.user!.CreatedTracks.length > Number(MAX_AMOUNT_OF_DRAFTS_AT_ONCE))
|
if (req.user!.CreatedTracks.length >= Number(MAX_AMOUNT_OF_DRAFTS_AT_ONCE))
|
||||||
return res.status(400).send("You ran out of free draft spots. Please delete some first.");
|
return res.status(400).send("You ran out of free draft spots. Please delete some first.");
|
||||||
|
|
||||||
const SongData = await Song.create({
|
const SongData = await Song.create({
|
||||||
|
@ -250,4 +250,4 @@ App.post("/submit",
|
||||||
export default {
|
export default {
|
||||||
App,
|
App,
|
||||||
DefaultAPI: "/api/drafts"
|
DefaultAPI: "/api/drafts"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user