Exemplo n.º 1
0
def update_preset(preset=None):
    """
        Update given preset info
    """
    body = request.get_json()
    code, resp = PresetsController.update(g.user, preset, body)
    return code, resp
Exemplo n.º 2
0
def order_presets():
    """
        Update preset order for display
    """
    body = request.get_json()
    code, resp = PresetsController.update_order(g.user, body)
    return code, resp
Exemplo n.º 3
0
def create_preset():
    """
        Create a `abuse.models.TicketWorkflowPreset`
    """
    body = request.get_json()
    code, resp = PresetsController.create(g.user, body)
    return code, resp
Exemplo n.º 4
0
def get_all_presets():
    """
        Get all `abuse.models.TicketWorkflowPreset` available
    """
    filters = None
    if "filters" in request.args:
        filters = request.args["filters"]
    code, resp = PresetsController.index(g.user, filters=filters)
    return code, resp
Exemplo n.º 5
0
def delete_preset(preset=None):
    """
        Delete given preset info
    """
    code, resp = PresetsController.delete(g.user, preset)
    return code, resp
Exemplo n.º 6
0
def get_preset(preset=None):
    """
        Get given preset info
    """
    code, resp = PresetsController.show(g.user, preset)
    return code, resp
Exemplo n.º 7
0
def get_ticket_prefetched_preset(ticket=None, preset=None):
    """ Get a template prefetched with ticket infos
    """
    code, resp = PresetsController.get_prefetch_preset(g.user, ticket, preset)
    return code, resp