Skip to content

Commit 88c3489

Browse files
committed
refactor: update badge endpoints for admin access and improve error handling in travel support and workshop routers
1 parent d589b0c commit 88c3489

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

docs/OPENBADGES_IMPLEMENTATION.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ The badge system issues **OpenBadges 3.0 compliant** digital credentials to spea
9696

9797
**Endpoints:**
9898

99-
- **`badge.issue`** - Issue single badge to speaker
100-
- **`badge.bulkIssue`** - Issue badges to multiple speakers
101-
- **`badge.list`** - List badges for conference/speaker
102-
- **`badge.verify`** - Verify badge signature (admin)
99+
- **`badge.admin.issue`** - Issue single badge to speaker
100+
- **`badge.admin.bulkIssue`** - Issue badges to multiple speakers
101+
- **`badge.admin.list`** - List badges for conference/speaker
102+
- **`badge.verify`** - Verify badge signature (public)
103103

104104
**Features:**
105105

src/lib/travel-support/sanity.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export async function getTravelSupport(
4545

4646
export async function getTravelSupportById(id: string): Promise<{
4747
travelSupport:
48-
| (TravelSupportWithSpeaker & { expenses: TravelExpense[] })
49-
| null
48+
| (TravelSupportWithSpeaker & { expenses: TravelExpense[] })
49+
| null
5050
error: Error | null
5151
}> {
5252
try {

src/server/routers/sponsor.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,9 @@ async function sendContractSignedSlackNotification(
178178
try {
179179
const salesChannel = sfc.conference?._id
180180
? await clientReadUncached.fetch<string | null>(
181-
`*[_type == "conference" && _id == $id][0].salesNotificationChannel`,
182-
{ id: sfc.conference._id },
183-
)
181+
`*[_type == "conference" && _id == $id][0].salesNotificationChannel`,
182+
{ id: sfc.conference._id },
183+
)
184184
: null
185185

186186
if (!salesChannel) return
@@ -2371,9 +2371,9 @@ export const sponsorRouter = router({
23712371
: undefined,
23722372
tier: sponsorForConference.tier
23732373
? {
2374-
title: sponsorForConference.tier.title,
2375-
tagline: sponsorForConference.tier.tagline,
2376-
}
2374+
title: sponsorForConference.tier.title,
2375+
tagline: sponsorForConference.tier.tagline,
2376+
}
23772377
: undefined,
23782378
addons: sponsorForConference.addons?.map((a) => ({
23792379
title: a.title,

src/server/routers/workshop.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export const workshopRouter = router({
240240
workshopTitle: signup.workshop?.title ?? input.workshop._ref,
241241
workshopDate: (signup.workshop as { date?: string })?.date,
242242
workshopTime: (signup.workshop as { startTime?: string })?.startTime,
243-
}).catch(() => { })
243+
}).catch(() => {})
244244

245245
revalidateTag('content:workshops', 'default')
246246
revalidateTag('admin:workshops', 'default')
@@ -391,7 +391,7 @@ export const workshopRouter = router({
391391
workshopDate: (signup.workshop as { date?: string })?.date,
392392
workshopTime: (signup.workshop as { startTime?: string })
393393
?.startTime,
394-
}).catch(() => { })
394+
}).catch(() => {})
395395
}
396396
}
397397

@@ -528,7 +528,7 @@ export const workshopRouter = router({
528528
workshopDate: (signup.workshop as { date?: string })?.date,
529529
workshopTime: (signup.workshop as { startTime?: string })
530530
?.startTime,
531-
}).catch(() => { })
531+
}).catch(() => {})
532532
}
533533

534534
return signup
@@ -688,7 +688,7 @@ export const workshopRouter = router({
688688
workshopDate: (signup.workshop as { date?: string })?.date,
689689
workshopTime: (signup.workshop as { startTime?: string })
690690
?.startTime,
691-
}).catch(() => { })
691+
}).catch(() => {})
692692

693693
revalidateTag('content:workshops', 'default')
694694
revalidateTag('admin:workshops', 'default')

0 commit comments

Comments
 (0)