feat: Actualizar versión del paquete y agregar endpoint API para pruebas de entidad
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "amayo",
|
"name": "amayo",
|
||||||
"version": "2.0.22",
|
"version": "2.1.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "amayo",
|
"name": "amayo",
|
||||||
"version": "2.0.22",
|
"version": "2.1.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/genai": "1.20.0",
|
"@google/genai": "1.20.0",
|
||||||
|
|||||||
@@ -270,7 +270,8 @@ export const handler = async (req: IncomingMessage, res: ServerResponse) => {
|
|||||||
// Dashboard routes (require session) — exclude labs which has its own handler
|
// Dashboard routes (require session) — exclude labs which has its own handler
|
||||||
if (
|
if (
|
||||||
url.pathname === "/dashboard" ||
|
url.pathname === "/dashboard" ||
|
||||||
(url.pathname.startsWith("/dashboard/") && !url.pathname.startsWith("/dashboard/labs"))
|
(url.pathname.startsWith("/dashboard/") &&
|
||||||
|
!url.pathname.startsWith("/dashboard/labs"))
|
||||||
) {
|
) {
|
||||||
const cookies = parseCookies(req);
|
const cookies = parseCookies(req);
|
||||||
const signed = cookies["amayo_sid"];
|
const signed = cookies["amayo_sid"];
|
||||||
@@ -325,7 +326,8 @@ export const handler = async (req: IncomingMessage, res: ServerResponse) => {
|
|||||||
// dashboard should not render the site's navbar
|
// dashboard should not render the site's navbar
|
||||||
hideNavbar: true,
|
hideNavbar: true,
|
||||||
selectedGuild: visibleGuilds?.[0] ?? session?.guilds?.[0] ?? null,
|
selectedGuild: visibleGuilds?.[0] ?? session?.guilds?.[0] ?? null,
|
||||||
selectedGuildId: visibleGuilds?.[0]?.id ?? session?.guilds?.[0]?.id ?? null,
|
selectedGuildId:
|
||||||
|
visibleGuilds?.[0]?.id ?? session?.guilds?.[0]?.id ?? null,
|
||||||
session,
|
session,
|
||||||
user: session?.user ?? null,
|
user: session?.user ?? null,
|
||||||
guilds: visibleGuilds || [],
|
guilds: visibleGuilds || [],
|
||||||
@@ -447,6 +449,17 @@ export const handler = async (req: IncomingMessage, res: ServerResponse) => {
|
|||||||
return res.end();
|
return res.end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// API endpoint for entity test: GET /api/entity.json
|
||||||
|
if (url.pathname === "/api/entity.json") {
|
||||||
|
res.writeHead(
|
||||||
|
200,
|
||||||
|
applySecurityHeadersForRequest(req, {
|
||||||
|
"Content-Type": "application/json; charset=utf-8",
|
||||||
|
})
|
||||||
|
);
|
||||||
|
return res.end(JSON.stringify({ conexion: "establecida" }));
|
||||||
|
}
|
||||||
|
|
||||||
// API proxy for dashboard roles: GET /api/dashboard/:id/roles
|
// API proxy for dashboard roles: GET /api/dashboard/:id/roles
|
||||||
if (
|
if (
|
||||||
url.pathname.startsWith("/api/dashboard/") &&
|
url.pathname.startsWith("/api/dashboard/") &&
|
||||||
|
|||||||
Reference in New Issue
Block a user