mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
Signed-off-by: limepotato <limepot@protonmail.ch>
This commit is contained in:
parent
5846a507f3
commit
2fd9394ef3
1 changed files with 7 additions and 1 deletions
|
@ -150,6 +150,7 @@ export const paramDef = {
|
||||||
},
|
},
|
||||||
required: ["choices"],
|
required: ["choices"],
|
||||||
},
|
},
|
||||||
|
spoofCreatedAt: { type: "string", nullable: true },
|
||||||
},
|
},
|
||||||
anyOf: [
|
anyOf: [
|
||||||
{
|
{
|
||||||
|
@ -282,9 +283,14 @@ export default define(meta, paramDef, async (ps, user) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let createdAt = new Date();
|
||||||
|
if (ps.spoofCreatedAt) {
|
||||||
|
createdAt = new Date(ps.spoofCreatedAt);
|
||||||
|
}
|
||||||
|
|
||||||
// Create a post
|
// Create a post
|
||||||
const note = await create(user, {
|
const note = await create(user, {
|
||||||
createdAt: new Date(),
|
createdAt,
|
||||||
files: files,
|
files: files,
|
||||||
poll: ps.poll
|
poll: ps.poll
|
||||||
? {
|
? {
|
||||||
|
|
Loading…
Reference in a new issue