api/utils/response.py
def response(message: Any, status: int = 200, extra: dict = {}, bot_message = '') -> JSONResponse:
    """Function for generating a server response."""
    resp: dict = {
        'message': message,
        'botmessage': bot_message or message,
        'status': status,
    }

    resp.update(extra)

    return JSONResponse(resp, status_code = status)
Function for generating a server response.
Function for generating a server response.
Function for generating a server response .
def response(message: Any, status: int = 200, extra: dict = {}, bot_message = '') -> JSONResponse:
    resp: dict = {
        'message': message,
        'botmessage': bot_message or message,
        'status': status,
    }
    resp.update(extra)
    return JSONResponse(resp, status_code = status)
def response ( message : Any , status : int = 200 , extra : dict = { } , bot_message = '' ) -> JSONResponse : resp : dict = { 'message' : message , 'botmessage' : bot_message or message , 'status' : status , } resp . update ( extra ) return JSONResponse ( resp , status_code = status )
Function for generating a server response.
Function for generating a server response .
"""Function for generating a server response."""
message
Any
status
int
extra
dict
bot_message