def delete(id): garanta = Validacoes() results = garanta.id_existe(id) if not results: return '', HTTPStatus.NOT_FOUND link = Links() link.delete_url(id) return '', HTTPStatus.OK
def deletarUser(id): garanta = Validacoes() if not garanta.user_existe(id=id): return 'User não existe', HTTPStatus.NOT_FOUND links = Links() if garanta.existe_url_do_usuario(id): links.delete_url(id_usuario=id) user = Users() user.deletarUser(id) return '', HTTPStatus.OK