import * as Metamigo from "@digiresilience/metamigo-common";
import Toys from "@hapipal/toys";

export const withDefaults = Toys.withRouteDefaults({
  options: {
    cors: true,
    auth: "session-id-bearer-token",
    validate: {
      failAction: Metamigo.validatingFailAction,
    },
  },
});

export const noAuth = Toys.withRouteDefaults({
  options: {
    cors: true,
    validate: {
      failAction: Metamigo.validatingFailAction,
    },
  },
});
