Esempio n. 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()
Esempio n. 2
0
File: api_v1.py Progetto: DOAJ/doaj
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()
Esempio n. 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()
Esempio n. 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()
Esempio n. 5
0
File: api_v1.py Progetto: DOAJ/doaj
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()
Esempio n. 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()
Esempio n. 7
0
def delete_article(article_id):
    ArticlesCrudApi.delete(article_id, current_user)
    return no_content()
Esempio n. 8
0
def delete_application(application_id):
    ApplicationsCrudApi.delete(application_id, current_user._get_current_object())
    return no_content()
Esempio n. 9
0
File: api_v1.py Progetto: DOAJ/doaj
def delete_article(article_id):
    ArticlesCrudApi.delete(article_id, current_user)
    return no_content()
Esempio n. 10
0
File: api_v1.py Progetto: DOAJ/doaj
def delete_application(application_id):
    ApplicationsCrudApi.delete(application_id, current_user._get_current_object())
    return no_content()