mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
Fix for misbehaving clients
This commit is contained in:
parent
e72a4e76d6
commit
61723305e5
6
cli.ts
6
cli.ts
|
|
@ -515,7 +515,7 @@ const cliBuilder = new CliBuilder([
|
||||||
include: {
|
include: {
|
||||||
instance: true,
|
instance: true,
|
||||||
},
|
},
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (redact) {
|
if (redact) {
|
||||||
|
|
@ -994,7 +994,7 @@ const cliBuilder = new CliBuilder([
|
||||||
author: true,
|
author: true,
|
||||||
instance: true,
|
instance: true,
|
||||||
},
|
},
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (redact) {
|
if (redact) {
|
||||||
|
|
@ -1473,7 +1473,7 @@ const cliBuilder = new CliBuilder([
|
||||||
where: {
|
where: {
|
||||||
instanceId: null,
|
instanceId: null,
|
||||||
},
|
},
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (format === "json") {
|
if (format === "json") {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ export default apiRoute<{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
include: statusAndUserRelations,
|
include: statusAndUserRelations,
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ export default apiRoute<{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
include: userRelations,
|
include: userRelations,
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export default apiRoute<{
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
});
|
});
|
||||||
|
|
||||||
// Constuct HTTP Link header (next and prev)
|
// Constuct HTTP Link header (next and prev)
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ export default apiRoute<{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ export default apiRoute<{
|
||||||
include: statusAndUserRelations,
|
include: statusAndUserRelations,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ export default apiRoute<{
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
include: statusAndUserRelations,
|
include: statusAndUserRelations,
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ export default apiRoute<{
|
||||||
: undefined,
|
: undefined,
|
||||||
},
|
},
|
||||||
include: statusAndUserRelations,
|
include: statusAndUserRelations,
|
||||||
take: limit,
|
take: Number(limit),
|
||||||
orderBy: {
|
orderBy: {
|
||||||
id: "desc",
|
id: "desc",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue