Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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")
Exemple #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")