You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
375 B

import os
import copy
import json
from flask import Flask, request
from flask_restful import Resource, Api, abort
app = Flask(__name__)
api = Api(app)
class Empty(Resource):
def get(self):
try:
rating = copy.deepcopy(ratings[rating_id - 1])
del rating['rates']
return rating
except:
abort(404, error="Rating {} doesn't exist".format(rating_id))