feat: add build
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { type FastifyPluginAsync } from 'fastify';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { manageEndpoints } from './endpoints/endpoints.manage.ts';
|
||||
import { authPlugin } from './plugins/plugins.auth.ts';
|
||||
import { messageEndpoints } from './endpoints/endpoints.message.ts';
|
||||
import { z } from 'zod';
|
||||
|
||||
const api: FastifyPluginAsync = async (fastify) => {
|
||||
fastify.route({
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import type { FastifyPluginAsyncZod } from 'fastify-type-provider-zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { JwtAuth } from '#root/auth/auth.jwt.ts';
|
||||
import { statementSchema } from '#root/auth/auth.schemas.ts';
|
||||
import { Config } from '#root/config/config.ts';
|
||||
import type { FastifyPluginAsyncZod } from 'fastify-type-provider-zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
const manageEndpoints: FastifyPluginAsyncZod = async (fastify) => {
|
||||
const config = fastify.services.get(Config);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Config } from '#root/config/config.ts';
|
||||
import { MqttServer } from '#root/server/server.ts';
|
||||
import type { FastifyPluginAsyncZod } from 'fastify-type-provider-zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { Config } from '#root/config/config.ts';
|
||||
import { MqttServer } from '#root/server/server.ts';
|
||||
|
||||
const messageEndpoints: FastifyPluginAsyncZod = async (fastify) => {
|
||||
const config = fastify.services.get(Config);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SessionProvider } from '#root/services/sessions/sessions.provider.ts';
|
||||
import type { FastifyPluginAsyncZod } from 'fastify-type-provider-zod';
|
||||
|
||||
import { SessionProvider } from '#root/services/sessions/sessions.provider.ts';
|
||||
|
||||
const authPlugin: FastifyPluginAsyncZod = async (fastify) => {
|
||||
fastify.addHook('onRequest', async (req, reply) => {
|
||||
const authProvider = req.headers['x-auth-provider'];
|
||||
|
||||
Reference in New Issue
Block a user