Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

Remove the /user/:userId/database route

天舟8e15eee5c366
diff --git a/frontend/src/miragejs/routes/user.js b/frontend/src/miragejs/routes/user.js
index e5574a44e9..1add0cda39 100644
--- a/frontend/src/miragejs/routes/user.js
+++ b/frontend/src/miragejs/routes/user.js
@@ -30,36 +30,4 @@ export default function configureUser(route) {
return user.update(attrs);
});
-
- route.get("/user/:userId/database", function (schema, request) {
- const user = schema.users.find(request.params.userId);
-
- if (!user) {
- return new Response(
- 404,
- {},
- {
- errors: "User id " + request.params.userId + " not found",
- }
- );
- }
-
- return schema.databases.where((database) => {
- const dataSourceList = schema.dataSources.where({
- workspaceId: WORKSPACE_ID,
- databaseId: database.id,
- });
-
- for (const dataSource of dataSourceList.models) {
- if (
- dataSource.memberList.find((item) => {
- return item.principalId == request.params.userId;
- })
- ) {
- return true;
- }
- }
- return false;
- });
- });
}