feat(libsql): enhance libsql service integration in user permissions and project router

- Added 'libsql' to the Services type in add-permissions.tsx for improved service management.
- Implemented extraction logic for 'libsql' services in the extractServices function.
- Updated project router to include 'libsql' in service filters and response columns, ensuring comprehensive data handling for libsql services.
This commit is contained in:
Mauricio Siu
2026-03-23 15:45:24 -06:00
parent 49d79fcd37
commit dce1454d4d
2 changed files with 38 additions and 13 deletions
@@ -46,7 +46,8 @@ export type Services = {
| "mysql"
| "mongo"
| "redis"
| "compose";
| "compose"
| "libsql";
description?: string | null;
id: string;
createdAt: string;
@@ -136,6 +137,18 @@ export const extractServices = (data: Environment | undefined) => {
serverId: item.serverId,
})) ?? []) as Services[];
const libsql: Services[] =
data?.libsql?.map((item) => ({
appName: item.appName,
name: item.name,
type: "libsql" as const,
id: item.libsqlId,
createdAt: item.createdAt,
status: item.applicationStatus,
description: item.description,
serverId: item.serverId,
})) || [];
applications.push(
...mysql,
...redis,
@@ -143,6 +156,7 @@ export const extractServices = (data: Environment | undefined) => {
...postgres,
...mariadb,
...compose,
...libsql,
);
applications.sort((a, b) => {