Пример #1
0
def delete_waifu(waifu_id, user_token):
    try:
        WaifuRepository.delete_waifu(user_token, waifu_id)
        return "success", 200
    except Exception as e:
        print("Error in delete_waifu {}".format(str(e)))
        return "Could not delete the waifu...", 400
Пример #2
0
def save_waifu(user_token):
    try:
        WaifuRepository.save_waifu(user_token, request.json)
        return "success", 200
    except Exception as e:
        print("Error in delete_waifu {}".format(str(e)))
        return "Could not delete the waifu...", 400
Пример #3
0
def get_top_waifus(number_of_waifus):
    return WaifuRepository.get_top_waifus(number_of_waifus)
Пример #4
0
def get_waifu_ids_by_character_ids(user_token):
    return WaifuRepository.get_waifus_by_list_of_waifu_ids(user_token, request.json)
Пример #5
0
def get_waifu_by_token_and_anime_id(anime_id, user_token):
    return WaifuRepository.get_waifus_by_token_and_anime_id(user_token, anime_id)
Пример #6
0
def get_user_waifu_count(user_token):
    return WaifuRepository.get_number_of_waifus(user_token)
Пример #7
0
def get_waifus_by_user_token(user_token):
    return WaifuRepository.get_waifus_by_token(user_token)