diff --git a/Server/webbyBits.py b/Server/webbyBits.py index e980e62..aafb6ee 100644 --- a/Server/webbyBits.py +++ b/Server/webbyBits.py @@ -26,7 +26,7 @@ else: ADMIN_PASS = hashlib.sha256(bytes(tempPass,'utf-8')).hexdigest() # True = everyone, False = admin only. Change in client while in use. -# play-pause,skip,addsong,partymode,volume in order +# play-pause,skip,addsong,partymode,volume,add duplicates in order controlPerms = { "PP":True, "SK":True, @@ -48,9 +48,6 @@ elif "/" in soundLocation: soundLocation += "/" else: soundLocation += "\\" -#Create Virtual table for searching -#I'm not sure why i don't do this in the databaseGenerator, but it also takes like 3 seconds so i'm not messing with it rn - #Initializing all the global stuff random.seed() global partyMode @@ -223,8 +220,9 @@ def settingsControl(): return ERR_NO_ADMIN else: return {"error":"Not a valid setting","data":None},400 - except Exception as e: - return {"error":e,"data":None},500 + except KeyError as e: + print(f"Error: {e}") + return {"error":"Incorrect Data Sent","data":None},400 @app.route("/search", methods=['GET']) def searchSongDB(): diff --git a/wishlist.md b/wishlist.md index 77a58ad..691fa80 100644 --- a/wishlist.md +++ b/wishlist.md @@ -1,5 +1,6 @@ # Wishlist *Features I would like to add, will be completed in any order* +- [ ] Pages of song results, to avoid very long pages and large data being sent - [ ] RESTful design - [ ] Change all necesary POSTs to GET,DELETE (probably not PUT) - [ ] Write an api layout