all repos — caroster @ 697013da96cbab8cec2487977d72c09c114fdec7

[Octree] Group carpool to your event https://caroster.io

backend/src/index.ts (view raw)

 1import bootstrapActions from "./bootstrap";
 2import graphqlExtends from "./graphql";
 3
 4export default {
 5  /**
 6   * An asynchronous register function that runs before
 7   * your application is initialized.
 8   *
 9   * This gives you an opportunity to extend code.
10   */
11  register(context) {
12    graphqlExtends(context);
13
14    // Because of bug https://github.com/strapi/strapi/issues/17995, we're forced
15    // to enable "plugin::users-permissions.user" permission for Authenticated role.
16    context.strapi.controller("plugin::users-permissions.user").find = (ctx) =>
17      ctx.unauthorized();
18  },
19
20  /**
21   * An asynchronous bootstrap function that runs before
22   * your application gets started.
23   *
24   * This gives you an opportunity to set up your data model,
25   * run jobs, or perform some special logic.
26   */
27  async bootstrap(context) {
28    for (let action of bootstrapActions) {
29      await action(context);
30    }
31  },
32};