示例#1
0
 def get(self, id):
     '''
     Get a single user.
     Requires being authenticated as himself or being admin
     '''
     res = links.get_user({'id':id})
     if res is not None:
         self.set_status(200)
         self.write(res)
     raise HTTPError(404, "User not found")
示例#2
0
 def put(self, id):
     '''
     Replace info for a user
     '''
     res = links.get_user({'id':id})
     if res is not None:
         #FIXME: modify
         self.set_status(200)
         self.write(res)
     raise HTTPError(404, "User not found")
示例#3
0
 def get(self, id):
     '''
     Get a single user.
     Requires being authenticated as himself or being admin
     '''
     res = links.get_user({'id': id})
     if res is not None:
         self.set_status(200)
         self.write(res)
     raise HTTPError(404, "User not found")
示例#4
0
 def put(self, id):
     '''
     Replace info for a user
     '''
     res = links.get_user({'id': id})
     if res is not None:
         #FIXME: modify
         self.set_status(200)
         self.write(res)
     raise HTTPError(404, "User not found")
示例#5
0
 def delete(self, id):
     '''
     Deletes a single user.
     Requires being authenticated as himself or being admin
     '''
     res = links.get_user({'id':id})
     if res is not None:
         #FIXME: delete
         self.set_status(204)
         self.write("")
     raise HTTPError(404, "User not found")
示例#6
0
 def delete(self, id):
     '''
     Deletes a single user.
     Requires being authenticated as himself or being admin
     '''
     res = links.get_user({'id': id})
     if res is not None:
         #FIXME: delete
         self.set_status(204)
         self.write("")
     raise HTTPError(404, "User not found")