GitFOSS
.ts
TypeScript
(application/typescript)
// 1st-party
import { makeService } from "@ethicdevs/react-monolith";
// app
import type { AuthServiceAPI, AuthServiceDeps } from "./types";
// service methods
import { default as makeCreateUser } from "./createUser";
import { default as makeIsExistingUsername } from "./isExistingUsername";
import { default as makeIsExistingEmailAddress } from "./isExistingEmailAddress";
import { default as makeIsUserLoginAllowed } from "./isUserLoginAllowed";

export const makeAuthService = makeService<AuthServiceAPI, AuthServiceDeps>({
  createUser: makeCreateUser,
  isExistingUsername: makeIsExistingUsername,
  isExistingEmailAddress: makeIsExistingEmailAddress,
  isUserLoginAllowed: makeIsUserLoginAllowed,
});