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()
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()
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()
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()
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()
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()
def delete_article(article_id): ArticlesCrudApi.delete(article_id, current_user) return no_content()
def delete_application(application_id): ApplicationsCrudApi.delete(application_id, current_user._get_current_object()) return no_content()