diff --git a/extensions/apikey.py b/extensions/apikey.py index 70fcada..99a6c37 100644 --- a/extensions/apikey.py +++ b/extensions/apikey.py @@ -27,4 +27,8 @@ async def apikey_put(apikey: APIKey = Depends(get_api_key)): if path.exists(path.join(configGet("data", "locations"), apikey)): # type: ignore move(path.join(configGet("data", "locations"), apikey), path.join(configGet("data", "locations"), new_key)) # type: ignore - return UJSONResponse({"apikey": new_key}) \ No newline at end of file + return UJSONResponse({"apikey": new_key}) + +@app.get("/apikey", response_class=UJSONResponse, description="Check API key") +async def apikey_check(apikey: APIKey = Depends(get_api_key)): + return UJSONResponse({"detail": "This key is valid."}) \ No newline at end of file