Saves unlim by -1 added
This commit is contained in:
parent
02552dce5a
commit
5f8dff42c3
@ -50,7 +50,7 @@ async def devices_post(name: str, os: str, apikey: APIKey = Depends(get_api_key)
|
||||
|
||||
user = user_by_key(apikey)
|
||||
|
||||
if col_devices.count_documents({"user": user}) >= configGet("devices", "limits"):
|
||||
if (configGet("devices", "limits") != -1) and (col_devices.count_documents({"user": user}) >= configGet("devices", "limits")):
|
||||
return UJSONResponse(
|
||||
{
|
||||
"detail": f'Too many devices. This instance allows to register only {configGet("devices", "limits")} devices per user',
|
||||
|
@ -137,7 +137,7 @@ async def saves_post(device: str, files: List[UploadFile], apikey: APIKey = Depe
|
||||
|
||||
error_return = HTTPException(HTTP_406_NOT_ACCEPTABLE, detail="You must provide two files: save file and SaveGameInfo for that save")
|
||||
|
||||
if col_saves.count_documents({"user": user}) >= configGet("saves", "limits"):
|
||||
if (configGet("saves", "limits") != -1) and (col_saves.count_documents({"user": user}) >= configGet("saves", "limits")):
|
||||
return UJSONResponse(
|
||||
{
|
||||
"detail": f'Too many save files. This instance allows to store only {configGet("saves", "limits")} saves per user',
|
||||
|
Loading…
Reference in New Issue
Block a user