mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-04 09:46:40 +00:00
add site targets, client resources, and auto login
This commit is contained in:
@@ -71,22 +71,22 @@ export async function removeRoleSite(
|
||||
);
|
||||
}
|
||||
|
||||
const siteResources = await db
|
||||
.select()
|
||||
.from(resources)
|
||||
.where(eq(resources.siteId, siteId));
|
||||
|
||||
for (const resource of siteResources) {
|
||||
await trx
|
||||
.delete(roleResources)
|
||||
.where(
|
||||
and(
|
||||
eq(roleResources.roleId, roleId),
|
||||
eq(roleResources.resourceId, resource.resourceId)
|
||||
)
|
||||
)
|
||||
.returning();
|
||||
}
|
||||
// const siteResources = await db
|
||||
// .select()
|
||||
// .from(resources)
|
||||
// .where(eq(resources.siteId, siteId));
|
||||
//
|
||||
// for (const resource of siteResources) {
|
||||
// await trx
|
||||
// .delete(roleResources)
|
||||
// .where(
|
||||
// and(
|
||||
// eq(roleResources.roleId, roleId),
|
||||
// eq(roleResources.resourceId, resource.resourceId)
|
||||
// )
|
||||
// )
|
||||
// .returning();
|
||||
// }
|
||||
});
|
||||
|
||||
return response(res, {
|
||||
|
||||
Reference in New Issue
Block a user