Пример #1
0
def bulk_article_delete():
    # get the data from the request
    try:
        data = json.loads(request.data.decode("utf-8"))
    except:
        raise Api400Error("Supplied data was not valid JSON")

    ArticlesBulkApi.delete(data, current_user._get_current_object())

    return no_content()
Пример #2
0
def bulk_article_delete():
    # get the data from the request
    try:
        data = json.loads(request.data)
    except:
        raise Api400Error("Supplied data was not valid JSON")

    ArticlesBulkApi.delete(data, current_user._get_current_object())

    return no_content()
Пример #3
0
def bulk_application_delete():
    # get the data from the request
    try:
        data = json.loads(request.data)
    except:
        raise Api400Error("Supplied data was not valid JSON")

    ApplicationsBulkApi.delete(data, current_user)

    return no_content()
Пример #4
0
def update_article(article_id):
    # get the data from the request
    try:
        data = json.loads(request.data.decode("utf-8"))
    except:
        raise Api400Error("Supplied data was not valid JSON")

    # delegate to the API implementation
    ArticlesCrudApi.update(article_id, data, current_user)

    # respond with a suitable No Content successful response
    return no_content()
Пример #5
0
def update_article(article_id):
    # get the data from the request
    try:
        data = json.loads(request.data)
    except:
        raise Api400Error("Supplied data was not valid JSON")

    # delegate to the API implementation
    ArticlesCrudApi.update(article_id, data, current_user)

    # respond with a suitable No Content successful response
    return no_content()
Пример #6
0
def update_application(application_id):
    # get the data from the request
    try:
        data = json.loads(request.data)
    except:
        raise Api400Error("Supplied data was not valid JSON")

    # delegate to the API implementation
    ApplicationsCrudApi.update(application_id, data,
                               current_user._get_current_object())

    # respond with a suitable No Content successful response
    return no_content()
Пример #7
0
def delete_article(article_id):
    ArticlesCrudApi.delete(article_id, current_user)
    return no_content()
Пример #8
0
def delete_application(application_id):
    ApplicationsCrudApi.delete(application_id, current_user._get_current_object())
    return no_content()
Пример #9
0
def delete_article(article_id):
    ArticlesCrudApi.delete(article_id, current_user)
    return no_content()
Пример #10
0
def delete_application(application_id):
    ApplicationsCrudApi.delete(application_id, current_user._get_current_object())
    return no_content()