mirror of
https://git.qoto.org/fedipage/fedipage.git
synced 2024-11-15 19:47:57 +01:00
Changed then to await.
This commit is contained in:
parent
87a1458858
commit
bb57253ff0
1 changed files with 6 additions and 6 deletions
|
@ -42,10 +42,10 @@ export default async function (req: VercelRequest, res: VercelResponse) {
|
|||
let sentIds = [];
|
||||
if ( (!config.exists) || (configData == undefined) ) {
|
||||
// Config doesn't exist, make something
|
||||
configRef.set({
|
||||
await configRef.set({
|
||||
"sentIds": [],
|
||||
"lastEpoch": ""
|
||||
}).then(result => response.status(200));
|
||||
});
|
||||
} else {
|
||||
if( configData.sentIds.length > 0 ) {
|
||||
sentIds.push(...configData.sentIds);
|
||||
|
@ -59,10 +59,10 @@ export default async function (req: VercelRequest, res: VercelResponse) {
|
|||
res.status(401).end("Function is rate limited, please wait")
|
||||
return;
|
||||
} else {
|
||||
configRef.set({
|
||||
await configRef.set({
|
||||
"sentIds": sentIds,
|
||||
"lastEpoch": new Date().getTime()
|
||||
}).then(result => response.status(200));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -119,10 +119,10 @@ export default async function (req: VercelRequest, res: VercelResponse) {
|
|||
if( sendingIds.size > 0 ) {
|
||||
newSentIds.push(...sendingIds);
|
||||
}
|
||||
configRef.set({
|
||||
await configRef.set({
|
||||
"sentIds": newSentIds,
|
||||
"lastEpoch": new Date().getTime()
|
||||
}).then(result => response.status(200));
|
||||
});
|
||||
|
||||
console.log("sendNode successful", sentIds, sendingIds, newSentIds);
|
||||
|
||||
|
|
Loading…
Reference in a new issue