added new of dashboard and log apply on routes

This commit is contained in:
2026-02-26 17:08:49 +05:30
parent 568428b5d0
commit 45bfd4b592
16 changed files with 427 additions and 164 deletions

View File

@@ -0,0 +1,23 @@
from flask import jsonify
from app.constants.http_status import HTTPStatus
class ResponseHandler:
@staticmethod
def success(message, data=None, status_code=HTTPStatus.OK):
return jsonify({
"status": "success",
"message": message,
"data": data if data else {},
"errors": []
}), status_code
@staticmethod
def error(message, errors=None, status_code=HTTPStatus.BAD_REQUEST):
return jsonify({
"status": "error",
"message": message,
"data": {},
"errors": errors if errors else []
}), status_code