npm run fmt
This commit is contained in:
parent
21fe35da05
commit
11c595619d
21 changed files with 155 additions and 137 deletions
|
|
@ -7,7 +7,8 @@ export const registerNextAuth = async (
|
|||
server: Hapi.Server,
|
||||
config: IAppConfig
|
||||
): Promise<void> => {
|
||||
const nextAuthAdapterFactory: any = (request: Hapi.Request) => new NextAuthAdapter(request.db());
|
||||
const nextAuthAdapterFactory: any = (request: Hapi.Request) =>
|
||||
new NextAuthAdapter(request.db());
|
||||
|
||||
await server.register({
|
||||
plugin: NextAuthPlugin,
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ export const register = async (
|
|||
await registerSwagger(server);
|
||||
await registerCloudflareAccessJwt(server, config);
|
||||
await registerAuthBearer(server, config);
|
||||
await registerPostgraphile(server, config)
|
||||
await registerPostgraphile(server, config);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ export const VoiceProviderRoutes = Helpers.withDefaults([
|
|||
},
|
||||
]);
|
||||
|
||||
class VoiceLineRecordController extends CrudControllerBase(VoiceLineRecord) { }
|
||||
class VoiceLineRecordController extends CrudControllerBase(VoiceLineRecord) {}
|
||||
|
||||
const validator = (): Record<string, Hapi.RouteOptionsValidate> => ({
|
||||
create: {
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ export const TwilioRoutes = Helpers.noAuth([
|
|||
},
|
||||
async handler(request: Hapi.Request, _h: Hapi.ResponseToolkit) {
|
||||
const { voiceLineId } = request.params;
|
||||
const { To } = request.payload as { To: string; };
|
||||
const { To } = request.payload as { To: string };
|
||||
const voiceLine = await request.db().voiceLines.findBy({ number: To });
|
||||
if (!voiceLine) return Boom.notFound();
|
||||
if (voiceLine.id !== voiceLineId) return Boom.badRequest();
|
||||
|
|
@ -193,7 +193,7 @@ export const TwilioRoutes = Helpers.noAuth([
|
|||
},
|
||||
},
|
||||
async handler(request: Hapi.Request, h: Hapi.ResponseToolkit) {
|
||||
const { providerId } = request.params as { providerId: string; };
|
||||
const { providerId } = request.params as { providerId: string };
|
||||
const provider: SavedVoiceProvider = await request
|
||||
.db()
|
||||
.voiceProviders.findById({ id: providerId });
|
||||
|
|
|
|||
|
|
@ -1,3 +1,2 @@
|
|||
export * from "./server/index.js"
|
||||
export * from "./logger.js"
|
||||
|
||||
export * from "./server/index.js";
|
||||
export * from "./logger.js";
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ async function runServer(): Promise<void> {
|
|||
await startWithout(["worker"]);
|
||||
}
|
||||
|
||||
runServer();
|
||||
runServer();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue