Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dziraf committed Feb 28, 2022
1 parent 5797162 commit 5ce6a89
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 24 deletions.
16 changes: 8 additions & 8 deletions examples/auth.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import MongooseAdapter from '@adminjs/mongoose';
import AdminJS from 'adminjs';
import express from 'express';
import mongoose from 'mongoose';
import AdminJSExpress from '../src';
import './mongoose/admin-model';

import './mongoose/article-model';
import MongooseAdapter from "@adminjs/mongoose";
import AdminJS from "adminjs";
import express from "express";
import mongoose from "mongoose";
import AdminJSExpress from "../src";
import "./mongoose/admin-model";

import "./mongoose/article-model";

AdminJS.registerAdapter(MongooseAdapter);

Expand Down
6 changes: 3 additions & 3 deletions src/authentication/login.handler.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import AdminJS from 'adminjs';
import { Router } from 'express';
import AdminJS from "adminjs";
import { Router } from "express";
import {
AuthenticationMaxRetriesOptions,
AuthenticationOptions,
} from '../types';
} from "../types";

const getLoginPath = (admin: AdminJS): string => {
const { loginPath, rootPath } = admin.options;
Expand Down
23 changes: 10 additions & 13 deletions src/buildAuthenticatedRouter.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import AdminJS from 'adminjs';
import express, { Router } from 'express';
import formidableMiddleware from 'express-formidable';
import session from 'express-session';
import { withLogin } from './authentication/login.handler';
import { withLogout } from './authentication/logout.handler';
import { withProtectedRoutesHandler } from './authentication/protected-routes.handler';
import { buildRouter } from './buildRouter';
import { OldBodyParserUsedError } from './errors';
import {
AuthenticationOptions,
FormidableOptions,
} from './types';
import AdminJS from "adminjs";
import express, { Router } from "express";
import formidableMiddleware from "express-formidable";
import session from "express-session";
import { withLogin } from "./authentication/login.handler";
import { withLogout } from "./authentication/logout.handler";
import { withProtectedRoutesHandler } from "./authentication/protected-routes.handler";
import { buildRouter } from "./buildRouter";
import { OldBodyParserUsedError } from "./errors";
import { AuthenticationOptions, FormidableOptions } from "./types";

/**
* @typedef {Function} Authenticate
Expand Down

0 comments on commit 5ce6a89

Please sign in to comment.