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