withdrawal time-travel
Some checks are pending
/ test-build (push) Waiting to run

Signed-off-by: limepotato <limepot@protonmail.ch>
This commit is contained in:
mia 2024-08-28 00:18:38 -06:00 committed by limepotato
parent 5846a507f3
commit 2fd9394ef3

View file

@ -150,6 +150,7 @@ export const paramDef = {
},
required: ["choices"],
},
spoofCreatedAt: { type: "string", nullable: true },
},
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
const note = await create(user, {
createdAt: new Date(),
createdAt,
files: files,
poll: ps.poll
? {