8000 Fix/refactor music packages update by previ · Pull Request #186 · CoderBotOrg/backend · GitHub
[go: up one dir, main page]

Skip to content

Fix/refactor music packages update #186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix add music packages
  • Loading branch information
previ committed Feb 26, 2023
commit c3c5b92b50c8bbc0f30ab18a87b2a677d564c975
6 changes: 3 additions & 3 deletions coderbot/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,11 @@ def addMusicPackage():
file_to_upload.save(os.path.join('/tmp/', file_to_upload.filename))
music_pkg = MusicPackageManager.get_instance()
music_pkg.addPackage(file_to_upload.filename)
return 200
return "{}", 200
except ValueError:
return 409
return "{}", 409
except Exception:
return 400
return "{}", 400

def deleteMusicPackage(name):
"""
Expand Down
0