Skip to content

Commit

Permalink
Merge pull request #93 from zurdi15/develop
Browse files Browse the repository at this point in the history
v1.5.1
  • Loading branch information
zurdi15 authored Mar 30, 2023
2 parents 2366e2c + 1bcb015 commit b6a5fd4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
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

0 comments on commit b6a5fd4

Please sign in to comment.