Run prettier

This commit is contained in:
rijkvanzanten
2020-09-22 16:11:28 -04:00
parent e703d1e928
commit 85ca7b5d17
25 changed files with 203 additions and 129 deletions

View File

@@ -24,7 +24,7 @@ router.get(
};
return next();
}),
})
);
router.get(
@@ -38,7 +38,7 @@ router.get(
};
return next();
}),
})
);
router.post(
@@ -69,7 +69,7 @@ router.post(
}
return next();
}),
})
);
router.patch(
@@ -93,7 +93,7 @@ router.patch(
}
return next();
}),
})
);
router.delete(
@@ -103,7 +103,7 @@ router.delete(
await service.delete(req.params.pk);
return next();
}),
})
);
export default router;

View File

@@ -112,7 +112,9 @@ router.post(
try {
const record = await service.readByKey(keys as any, req.sanitizedQuery);
res.locals.payload = { data: res.locals.savedFiles.length === 1 ? record[0] : record || null };
res.locals.payload = {
data: res.locals.savedFiles.length === 1 ? record[0] : record || null,
};
} catch (error) {
if (error instanceof ForbiddenException) {
return next();
@@ -127,7 +129,7 @@ router.post(
const importSchema = Joi.object({
url: Joi.string().required(),
data: Joi.object()
data: Joi.object(),
});
router.post(

View File

@@ -1,6 +1,6 @@
import express from 'express';
import asyncHandler from 'express-async-handler';
import {FoldersService, MetaService} from '../services';
import { FoldersService, MetaService } from '../services';
import { ForbiddenException } from '../exceptions';
import useCollection from '../middleware/use-collection';

View File

@@ -1,7 +1,7 @@
import express from 'express';
import asyncHandler from 'express-async-handler';
import collectionExists from '../middleware/collection-exists';
import { ItemsService, MetaService} from '../services';
import { ItemsService, MetaService } from '../services';
import { RouteNotFoundException, ForbiddenException } from '../exceptions';
const router = express.Router();
@@ -29,7 +29,7 @@ router.post(
}
return next();
}),
})
);
router.get(
@@ -50,7 +50,7 @@ router.get(
data: records || null,
};
return next();
}),
})
);
router.get(
@@ -69,7 +69,7 @@ router.get(
data: result || null,
};
return next();
}),
})
);
router.patch(
@@ -100,7 +100,7 @@ router.patch(
}
return next();
}),
})
);
router.patch(
@@ -128,7 +128,7 @@ router.patch(
}
return next();
}),
})
);
router.delete(
@@ -139,7 +139,7 @@ router.delete(
const pk = req.params.pk.includes(',') ? req.params.pk.split(',') : req.params.pk;
await service.delete(pk as any);
return next();
}),
})
);
export default router;

View File

@@ -1,6 +1,6 @@
import express from 'express';
import asyncHandler from 'express-async-handler';
import { RevisionsService, MetaService} from '../services';
import { RevisionsService, MetaService } from '../services';
import useCollection from '../middleware/use-collection';
const router = express.Router();

View File

@@ -1,6 +1,6 @@
import express from 'express';
import asyncHandler from 'express-async-handler';
import { RolesService, MetaService} from '../services';
import { RolesService, MetaService } from '../services';
import { ForbiddenException } from '../exceptions';
import useCollection from '../middleware/use-collection';

View File

@@ -1,7 +1,11 @@
import express from 'express';
import asyncHandler from 'express-async-handler';
import Joi from 'joi';
import { InvalidPayloadException, InvalidCredentialsException, ForbiddenException } from '../exceptions';
import {
InvalidPayloadException,
InvalidCredentialsException,
ForbiddenException,
} from '../exceptions';
import { UsersService, MetaService, AuthenticationService } from '../services';
import useCollection from '../middleware/use-collection';

View File

@@ -1,6 +1,6 @@
import express from 'express';
import asyncHandler from 'express-async-handler';
import { WebhooksService, MetaService} from '../services';
import { WebhooksService, MetaService } from '../services';
import { ForbiddenException } from '../exceptions';
import useCollection from '../middleware/use-collection';