def get_routes(config: ApplicationConfig, context: Context) -> Tuple: return (endpoints.HealthEndpoint( config=config, context=context, uri='/', methods=('GET', 'POST'), ), endpoints.CreateEmployeeEndpoint( config, context, uri='/employee', methods=['POST'], ), endpoints.AuthEmployeeEndpoint( config, context, uri='/employee/auth', methods=['POST'], ), endpoints.EmployeeEndpoint( config, context, uri='/employee/<eid:int>', methods=['PATCH', 'DELETE'], auth_required=True, ), endpoints.AllEmployeeEndpoint( config, context, uri='/employee/all', methods=['GET'], auth_required=True, ))
def get_routes(config: ApplicationConfig, context: Context) -> Tuple: return (endpoints.HealthEndpoint( config=config, context=context, uri='/', methods=('GET', 'POST'), ), endpoints.CreateUserEndpoint( config, context, uri='/user', methods=['POST'], ), endpoints.AuthUserEndpoint( config, context, uri='/auth', methods=['POST'], ), endpoints.UserEndpoint( config, context, uri='/user/<uid:int>', methods=['GET', 'PATCH', 'DELETE'], auth_required=True, ), endpoints.AllUserEndpoint( config, context, uri='/user/all', methods=['GET'], auth_required=True, ), endpoints.CreateMessageEndpoint( config, context, uri='msg', methods=['POST'], auth_required=True, ), endpoints.AllMessagesEndpoint( config, context, uri='msg', methods=['GET'], auth_required=True, ), endpoints.MessageEndpoint( config, context, uri='msg/<message_id:int>', methods=['GET', 'PATCH', 'DELETE'], auth_required=True, ))
def get_routes(config: ApplicationConfig, context: Context) -> Tuple: return ( endpoints.HealthEndpoint(config=config, context=context, uri='/', methods=('GET', 'POST')), endpoints.CreateEmployeeEndpoint(config, context, uri='/employee', methods=['POST']), endpoints.CreateUserEndpoint(config, context=context, uri='/user', methods=['POST']), )
def get_routes(config: ApplicationConfig, context: Context) -> Tuple: return ( endpoints.HealthEndpoint( config=config, context=context, uri="/", methods=("GET", "POST"), ), endpoints.CreateUserEndpoint( config, context, uri="/user", methods=["POST"], ), endpoints.UserEndpoint( config, context, uri="/user/<user_id:int>", methods=["GET", "PATCH", "DELETE"], auth_required=True, ), endpoints.AuthEndpoint( config, context, uri="/auth", methods=["POST"], ), endpoints.MessagesEndpoint( config, context, uri="/msg", methods=["POST", "GET"], auth_required=True, ), endpoints.MessageByIdEndpoint( config, context, uri="/msg/<message_id:int>", methods=["GET", "PATCH", "DELETE"], auth_required=True, ), )
def get_routes(config: ApplicationConfig, context: Context) -> Tuple: """ Описание всех маршрутов приложения """ return ( endpoints.HealthEndpoint( config=config, context=context, uri='/', methods=('GET', 'POST'), ), endpoints.CreateUserEndpoint( config, context, uri='/user', methods=['POST'], ), endpoints.AuthUserEndpoint( config, context, uri='/auth', methods=['POST'], ), endpoints.UserEndpoint( config, context, uri='/user/<user_id:int>', methods=['GET', 'PATCH'], auth_required=True, ), endpoints.MessageEndpoint( config, context, uri='/msg', methods=['GET', 'POST'], auth_required=True, ), endpoints.SingleMessageEndpoint( config, context, uri='/msg/<message_id:int>', methods=['GET', 'PATCH', 'DELETE'], auth_required=True, ), )
def get_routes(config: ApplicationConfig, context: Context) -> tuple: return ( endpoints.HealthEndpoint( config=config, context=context, uri='/', methods=['GET', 'POST'] ), endpoints.CreateUserEndpoint( config=config, context=context, uri='/user', methods=['POST'] ), endpoints.AuthUserEndpoint( config, context, uri='/auth', methods=['POST'] ), endpoints.UserEndpoint( config, context, uri='/user/<uid:int>', methods=('GET', 'PATCH'), auth_required=True ), endpoints.UserEndpoint( config, context, uri='/user/<ulogin:string>', methods=('GET', 'PATCH'), auth_required=True ), endpoints.MessagesEndpoint( config=config, context=context, uri='/msg', methods=('GET', 'POST'), auth_required=True ), endpoints.MessageEndpoint( config=config, context=context, uri='/msg/<message_id:int>', methods=('GET', 'PATCH', 'DELETE'), auth_required=True ), endpoints.FilesEndpoint( config=config, context=context, uri='/files/<file_id:int>', methods=['GET'], auth_required=True ), endpoints.FilesEndpoint( config=config, context=context, uri='/files', methods=['POST'], auth_required=True ), )