def delete(self, *args, **kwargs): """ Unload a component. Args: username: the username Example URLs: DELETE /api/v1/accounts/test """ try: if len(args) != 1: raise ValueError("Invalid url") RUNTIME.remove_account(args[0]) except ValueError as ex: self.send_error(400, message=ex) except KeyError as ex: self.send_error(404, message=ex) self.set_status(204, None)
def delete(self, *args, **kwargs): """Unload a component. Args: [0]: the username Example URLs: DELETE /api/v1/accounts/test """ RUNTIME.remove_account(args[0])