feature: Adds lookup API endpoint.

This commit is contained in:
greysoh 2024-04-22 11:51:37 -04:00
parent 2ae917acd9
commit 9d3b5f82a0
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
7 changed files with 214 additions and 3 deletions

View file

@ -30,7 +30,7 @@ export function route(fastify: FastifyInstance, prisma: PrismaClient, tokens: Re
destinationPort: { type: "number" },
providerID: { type: "number" },
enabled: { type: "boolean"}
autoStart: { type: "boolean" }
}
}
}
@ -49,7 +49,7 @@ export function route(fastify: FastifyInstance, prisma: PrismaClient, tokens: Re
providerID: number,
enabled?: boolean
autoStart?: boolean
} = req.body;
if (!await hasPermission(body.token, [
@ -82,7 +82,7 @@ export function route(fastify: FastifyInstance, prisma: PrismaClient, tokens: Re
destProviderID: body.providerID,
enabled: Boolean(body.enabled)
enabled: Boolean(body.autoStart)
}
});