Files
amap/backend/src/messages.py
Julien Aldon 8352097ffb
Some checks failed
Deploy Amap / deploy (push) Failing after 16s
fix pylint errors
2026-03-03 11:08:08 +01:00

21 lines
701 B
Python

pdferror = 'An error occured during PDF generation please contact administrator'
class Messages:
unauthorized = 'User is Unauthorized'
notauthenticated = 'User is not authenticated'
tokenexipired = 'Token has expired'
invalidtoken = 'Token is invalid'
@staticmethod
def not_found(resource: str) -> str:
return f'{resource.capitalize()} not found'
@staticmethod
def invalid_input(resource: str, reason: str = "") -> str:
return f'Invalid {resource} input {':' if reason else ""} {reason}'
@staticmethod
def not_allowed(resource: str, action: str) -> str:
return f'User is not allowed to {action} this {resource}'