Skip to content

Commit 1b7f031

Browse files
committed
updated_at correctly included
1 parent 69e9a9a commit 1b7f031

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

atproto-slurper/slurper/server.ts

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ app.get("/calendar-events", async (req, res) => {
528528
.from("atproto_records")
529529
.select(
530530
`
531-
id, rkey, created_by, record_passed_review, is_core_event, admin_override,
531+
id, rkey, created_by, record_passed_review, is_core_event, admin_override, updated_at,
532532
atproto_dids!created_by(did, alias)
533533
`
534534
)
@@ -540,10 +540,10 @@ app.get("/calendar-events", async (req, res) => {
540540
res.status(500).json({ error });
541541
} else {
542542
const formatted = data?.map((rawEvent) => {
543-
let recordPassedReview = rawEvent.record_passed_review
543+
let recordPassedReview = rawEvent.record_passed_review;
544544
// const devconnectFormSubmissionsDid = 'did:plc:l26dgtpir4fydulvmuoee2sn'
545545
// // @ts-ignore
546-
// const currentDid = rawEvent.atproto_dids.did
546+
// const currentDid = rawEvent.atproto_dids.did
547547

548548
// const isDevconnectFormSubmission = currentDid === devconnectFormSubmissionsDid
549549

@@ -559,7 +559,7 @@ app.get("/calendar-events", async (req, res) => {
559559
// // This is because the form is UTC, but people have been entering the time in Argentina time, and so this is now the de facto standard
560560
// // Had to change the form to not say UTC as well, which is unfortunate - anyway, the fix for now is to convert from Argentina time back to UTC time for events through the form - this needs to be fixed for future editions if we still use atprotocol.
561561
// let fixedEvent = event
562-
562+
563563
// if (isDevconnectFormSubmission) {
564564
// if (event.timeblocks) {
565565
// fixedEvent.timeblocks = event.timeblocks.map((timeblock: any) => {
@@ -656,12 +656,13 @@ app.post(
656656

657657
const { error: contactError } = await supabase
658658
.from("atproto_records_contacts")
659-
.upsert({
660-
rkey,
661-
email: contact,
662-
},
663-
{ onConflict: "rkey" }
664-
);
659+
.upsert(
660+
{
661+
rkey,
662+
email: contact,
663+
},
664+
{ onConflict: "rkey" }
665+
);
665666

666667
if (contactError) {
667668
console.error(

lib/components/event-schedule-new/atproto-to-calendar-format.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const apiResultToCalendarFormat = (atprotoEventsData: any) => {
8282
const updatedAt = event.updated_at;
8383
// Need people to update their timeslots after the changes made on this date, so we will not show it until they have edited their event
8484
const updatedAfterSep3 = moment
85-
.utc(normalizeTimestamp(updatedAt))
85+
.utc(updatedAt)
8686
.isAfter(moment.utc("2025-09-03T17:30:00.000Z"));
8787

8888
return atprotoToCalendarFormat({

0 commit comments

Comments
 (0)