mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-22 11:45:06 +02:00
uncomment orgs list for dropdown
This commit is contained in:
parent
4706dea3bf
commit
25224e0343
3 changed files with 13 additions and 14 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { drizzle } from "drizzle-orm/better-sqlite3";
|
import { drizzle } from "drizzle-orm/better-sqlite3";
|
||||||
import Database from "better-sqlite3";
|
import Database from "better-sqlite3";
|
||||||
import * as schema from "@server/db/schema";
|
import * as schema from "@server/db/schema";
|
||||||
import config, { APP_PATH } from "@server/config";
|
import { APP_PATH } from "@server/config";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
|
||||||
const location = path.join(APP_PATH, "db", "db.sqlite");
|
const location = path.join(APP_PATH, "db", "db.sqlite");
|
||||||
|
|
|
@ -79,8 +79,6 @@ export async function listOrgs(
|
||||||
.where(inArray(orgs.orgId, userOrgIds));
|
.where(inArray(orgs.orgId, userOrgIds));
|
||||||
const totalCount = totalCountResult[0].count;
|
const totalCount = totalCountResult[0].count;
|
||||||
|
|
||||||
logger.debug("here2")
|
|
||||||
|
|
||||||
return response<ListOrgsResponse>(res, {
|
return response<ListOrgsResponse>(res, {
|
||||||
data: {
|
data: {
|
||||||
orgs: organizations,
|
orgs: organizations,
|
||||||
|
|
|
@ -68,17 +68,18 @@ export default async function ConfigurationLaytout(
|
||||||
}
|
}
|
||||||
|
|
||||||
let orgs: ListOrgsResponse["orgs"] = [];
|
let orgs: ListOrgsResponse["orgs"] = [];
|
||||||
// try {
|
try {
|
||||||
// const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
const res = await internal.get<AxiosResponse<ListOrgsResponse>>(
|
||||||
// `/orgs`,
|
`/orgs`,
|
||||||
// cookie
|
cookie
|
||||||
// );
|
);
|
||||||
// if (res && res.data.data.orgs) {
|
if (res && res.data.data.orgs) {
|
||||||
// orgs = res.data.data.orgs;
|
orgs = res.data.data.orgs;
|
||||||
// }
|
}
|
||||||
// } catch (e) {
|
} catch (e) {
|
||||||
// console.error("Error fetching orgs", e);
|
console.error("Error fetching orgs", e);
|
||||||
// }
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="w-full bg-muted mb-6 select-none sm:px-0 px-3 pt-3">
|
<div className="w-full bg-muted mb-6 select-none sm:px-0 px-3 pt-3">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue