Clean up. Almost ready to deploy maybe. REally wanna rewrite but hey eventually we will.
This commit is contained in:
@ -135,7 +135,7 @@ export const updateStatuses = async (
|
||||
)
|
||||
.select();
|
||||
|
||||
if (insertedStatusesError) throw new Error("Error inserting statuses!");
|
||||
if (insertedStatusesError) throw new Error('Error inserting statuses!');
|
||||
else if (insertedStatuses) {
|
||||
const createdAtFallback = new Date(Date.now()).toISOString();
|
||||
const statusUpdates = usersWithStatuses.map((s, i) => {
|
||||
@ -144,7 +144,7 @@ export const updateStatuses = async (
|
||||
status: status,
|
||||
created_at: insertedStatuses[i]?.created_at ?? createdAtFallback,
|
||||
updated_by: user,
|
||||
}
|
||||
};
|
||||
});
|
||||
await broadcastStatusUpdates(statusUpdates);
|
||||
return { success: true, data: statusUpdates };
|
||||
|
Reference in New Issue
Block a user