Skip to content
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

v1.5.1 #93

Merged
merged 3 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 10 additions & 10 deletions backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ async def rom(p_slug: str, file_name: str) -> dict:
return {'data': dbh.get_rom(p_slug, file_name)}


@app.delete("/platforms/{p_slug}/roms/{file_name}")
async def delete_rom(p_slug: str, file_name: str, filesystem: bool=False) -> dict:
"""Detele rom from filesystem and database"""

log.info("deleting rom...")
if filesystem: fs.delete_rom(p_slug, file_name)
dbh.delete_rom(p_slug, file_name)
return {'msg': 'success'}


@app.patch("/platforms/{p_slug}/roms")
async def updateRom(req: Request, p_slug: str) -> dict:
"""Updates rom details"""
Expand Down Expand Up @@ -50,16 +60,6 @@ async def updateRom(req: Request, p_slug: str) -> dict:
return {'data': updatedRom}


@app.delete("/platforms/{p_slug}/roms")
async def delete_rom(p_slug: str, file_name: str, filesystem: bool=False) -> dict:
"""Detele rom from filesystem and database"""

log.info("deleting rom...")
if filesystem: fs.delete_rom(p_slug, file_name)
dbh.delete_rom(p_slug, file_name)
return {'msg': 'success'}


@app.get("/platforms/{p_slug}/roms")
async def roms(p_slug: str) -> dict:
"""Returns all roms of the desired platform"""
Expand Down
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v1.5.1 (_31-03-2023_)

## Fix
- Delete game now works properly

# v1.5 (_30-03-2023_)

**`Breaking change`**
Expand Down