Пример #1
0
 def post(self):
     args = f.loadArgs(tradeArgs)
     token = request.headers.get("Authorization")
     return f.createTradeEntry(args, TradeModel, db, token, UserModel)
Пример #2
0
 def post(self):
     args = f.loadArgs(blogArgs)
     token = request.headers.get("Authorization")
     return f.createBlogEntry(args, BlogModel, db, token, UserModel)
Пример #3
0
 def post(self):
     args = f.loadArgs(userSignUpArgs)
     return f.createUser(args, UserModel, db, abort)
Пример #4
0
 def post(self):
     args = f.loadArgs(tokenVerifivationArgs)
     if f.verifyToken(args.token):
         return {"message" : "worked"}, 201
     else:
         return {"message" : "Token invalid"}, 404
Пример #5
0
 def post(self):
     args = f.loadArgs(userSignInArgs)
     return f.signIn(args, UserModel, abort)