chore(deps-dev): bump prettier from 2.1.2 to 2.8.8 (#5372)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -133,14 +133,12 @@ router.post("auth.info", auth(), async (ctx: APIContext) => {
|
||||
includeDetails: true,
|
||||
}),
|
||||
team: presentTeam(team),
|
||||
availableTeams: uniqBy(
|
||||
[...signedInTeams, ...availableTeams],
|
||||
"id"
|
||||
).map((team) =>
|
||||
presentAvailableTeam(
|
||||
team,
|
||||
signedInTeamIds.includes(team.id) || team.id === user.teamId
|
||||
)
|
||||
availableTeams: uniqBy([...signedInTeams, ...availableTeams], "id").map(
|
||||
(team) =>
|
||||
presentAvailableTeam(
|
||||
team,
|
||||
signedInTeamIds.includes(team.id) || team.id === user.teamId
|
||||
)
|
||||
),
|
||||
},
|
||||
policies: presentPolicies(user, [team]),
|
||||
|
||||
@@ -168,10 +168,8 @@ router.post(
|
||||
rateLimiter(RateLimiterStrategy.TenPerHour),
|
||||
auth(),
|
||||
async (ctx: APIContext) => {
|
||||
const {
|
||||
attachmentId,
|
||||
format = FileOperationFormat.MarkdownZip,
|
||||
} = ctx.request.body;
|
||||
const { attachmentId, format = FileOperationFormat.MarkdownZip } =
|
||||
ctx.request.body;
|
||||
assertUuid(attachmentId, "attachmentId is required");
|
||||
|
||||
const { user } = ctx.state.auth;
|
||||
@@ -630,16 +628,8 @@ router.post(
|
||||
);
|
||||
|
||||
router.post("collections.update", auth(), async (ctx: APIContext) => {
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
icon,
|
||||
permission,
|
||||
color,
|
||||
sort,
|
||||
sharing,
|
||||
} = ctx.request.body;
|
||||
const { id, name, description, icon, permission, color, sort, sharing } =
|
||||
ctx.request.body;
|
||||
|
||||
if (color) {
|
||||
assertHexColor(color, "Invalid hex value (please use format #FFFFFF)");
|
||||
|
||||
@@ -995,21 +995,18 @@ router.post(
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
documents,
|
||||
collections,
|
||||
collectionChanged,
|
||||
} = await sequelize.transaction(async (transaction) =>
|
||||
documentMover({
|
||||
user,
|
||||
document,
|
||||
collectionId,
|
||||
parentDocumentId,
|
||||
index,
|
||||
ip: ctx.request.ip,
|
||||
transaction,
|
||||
})
|
||||
);
|
||||
const { documents, collections, collectionChanged } =
|
||||
await sequelize.transaction(async (transaction) =>
|
||||
documentMover({
|
||||
user,
|
||||
document,
|
||||
collectionId,
|
||||
parentDocumentId,
|
||||
index,
|
||||
ip: ctx.request.ip,
|
||||
transaction,
|
||||
})
|
||||
);
|
||||
|
||||
ctx.body = {
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user