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

Feature/maintanace #508

Merged
merged 3 commits into from
May 3, 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
2 changes: 1 addition & 1 deletion docat/docat/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def check_token_for_project(db, token, project) -> TokenStatus:
if result and token:
token_hash = calculate_token(token, bytes.fromhex(result[0]["salt"]))
if result[0]["token"] == token_hash:
return TokenStatus(True)
return TokenStatus(True, "Docat-Api-Key token is valid")
else:
return TokenStatus(False, f"Docat-Api-Key token is not valid for {project}")
else:
Expand Down
2 changes: 1 addition & 1 deletion docat/docat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@dataclass(frozen=True)
class TokenStatus:
valid: bool
reason: str | None = None
reason: str


class ApiResponse(BaseModel):
Expand Down
Loading