Exemple #1
0
def update_event_status(
    uuid: UUID,
    event_status: EventStatusUpdate,
    request: Request,
    response: Response,
    db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=event_status, db_table=EventStatus, db=db)

    response.headers["Content-Location"] = request.url_for("get_event_status", uuid=uuid)
def update_node_history_action(
    uuid: UUID,
    node_history_action: NodeHistoryActionUpdate,
    request: Request,
    response: Response,
    db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=node_history_action, db_table=NodeHistoryAction, db=db)

    response.headers["Content-Location"] = request.url_for("get_node_history_action", uuid=uuid)
Exemple #3
0
def update_node_tag(
    uuid: UUID,
    node_tag: NodeTagUpdate,
    request: Request,
    response: Response,
    db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=node_tag, db_table=NodeTag, db=db)

    response.headers["Content-Location"] = request.url_for("get_node_tag", uuid=uuid)
Exemple #4
0
def update_alert_tool(
        uuid: UUID,
        alert_tool: AlertToolUpdate,
        request: Request,
        response: Response,
        db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=alert_tool, db_table=AlertTool, db=db)

    response.headers["Content-Location"] = request.url_for("get_alert_tool",
                                                           uuid=uuid)
def update_observable_type(
        uuid: UUID,
        observable_type: ObservableTypeUpdate,
        request: Request,
        response: Response,
        db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=observable_type, db_table=ObservableType, db=db)

    response.headers["Content-Location"] = request.url_for(
        "get_observable_type", uuid=uuid)
Exemple #6
0
def update_user_role(
        uuid: UUID,
        user_role: UserRoleUpdate,
        request: Request,
        response: Response,
        db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=user_role, db_table=UserRole, db=db)

    response.headers["Content-Location"] = request.url_for("get_user_role",
                                                           uuid=uuid)
Exemple #7
0
def update_disposition(
        uuid: UUID,
        disposition: AlertDispositionUpdate,
        request: Request,
        response: Response,
        db: Session = Depends(get_db),
):
    crud.update(uuid=uuid, obj=disposition, db_table=AlertDisposition, db=db)

    response.headers["Content-Location"] = request.url_for("get_disposition",
                                                           uuid=uuid)
Exemple #8
0
def update_event_prevention_tool(
        uuid: UUID,
        event_prevention_tool: EventPreventionToolUpdate,
        request: Request,
        response: Response,
        db: Session = Depends(get_db),
):
    crud.update(uuid=uuid,
                obj=event_prevention_tool,
                db_table=EventPreventionTool,
                db=db)

    response.headers["Content-Location"] = request.url_for(
        "get_event_prevention_tool", uuid=uuid)