|
@@ -192,6 +192,7 @@ app.get('/queue', (req, res) => {
|
|
app.post('/submit', SubmitWrapper)
|
|
app.post('/submit', SubmitWrapper)
|
|
|
|
|
|
function SubmitWrapper(req, res) {
|
|
function SubmitWrapper(req, res) {
|
|
|
|
+
|
|
db.execute(`SELECT uuid, song_name, album_name, link_to, artist, kind
|
|
db.execute(`SELECT uuid, song_name, album_name, link_to, artist, kind
|
|
from instrunet_entry
|
|
from instrunet_entry
|
|
where song_name = "${req.body.name}"
|
|
where song_name = "${req.body.name}"
|
|
@@ -214,7 +215,18 @@ function SubmitWrapper(req, res) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+ if(req.body.name === undefined){
|
|
|
|
+ req.body.name = "未知名称"
|
|
|
|
+ }
|
|
|
|
+ if(req.body.albumName === undefined){
|
|
|
|
+ req.body.albumName = "未知专辑"
|
|
|
|
+ }
|
|
|
|
+ if(req.body.link === undefined){
|
|
|
|
+ req.body.link = ""
|
|
|
|
+ }
|
|
|
|
+ if(req.body.artist === undefined){
|
|
|
|
+ req.body.artist = "未知艺术家"
|
|
|
|
+ }
|
|
if (req.body.file !== undefined) {
|
|
if (req.body.file !== undefined) {
|
|
queue.add(() => {
|
|
queue.add(() => {
|
|
Submit(req, res)
|
|
Submit(req, res)
|