This commit is contained in:
parent
2050391f4d
commit
8e18e72452
34
main.py
34
main.py
@ -11,23 +11,23 @@ if DB_REBUILD == 'True':
|
||||
|
||||
|
||||
class Location(BaseModel):
|
||||
id: int = None,
|
||||
name: str = None,
|
||||
country: str = None,
|
||||
longitude: float = None,
|
||||
latitude: float = None,
|
||||
user: int = None,
|
||||
id: int = None
|
||||
name: str = None
|
||||
country: str = None
|
||||
longitude: float = None
|
||||
latitude: float = None
|
||||
user: int = None
|
||||
|
||||
class Users(BaseModel):
|
||||
id: int = None,
|
||||
name: str = None,
|
||||
email: str = None,
|
||||
id: int = None
|
||||
name: str = None
|
||||
email: str = None
|
||||
|
||||
|
||||
class Config(BaseModel):
|
||||
id: int = None,
|
||||
user_id: int = None,
|
||||
location_id: int = None,
|
||||
id: int = None
|
||||
user_id: int = None
|
||||
location_id: int = None
|
||||
|
||||
|
||||
|
||||
@ -174,6 +174,16 @@ async def search_location(query: str):
|
||||
async def search_location(id: int,
|
||||
user: int
|
||||
):
|
||||
"""
|
||||
A function to disable a location configuration based on the provided ID and user.
|
||||
|
||||
Parameters:
|
||||
id (int): The ID of the location to be disabled.
|
||||
user (int): The user ID related to the location.
|
||||
|
||||
Returns:
|
||||
None
|
||||
"""
|
||||
|
||||
result = utils.config_disable_location(id, user)
|
||||
return result
|
||||
|
Loading…
x
Reference in New Issue
Block a user