fix: multiple bug fixes and improvements
- Fix suggested trips showing wrong sports for cross-country trips - Remove quick start sections from home variants (Classic, Spotify) - Remove dead quickActions code from HomeView - Fix pace capsule animation in TripCreationView - Add text wrapping to achievement descriptions - Improve poll parsing with better error handling - Various sharing system improvements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -184,6 +184,13 @@ actor PollService {
|
||||
}
|
||||
|
||||
func deletePoll(_ pollId: UUID) async throws {
|
||||
// Verify ownership before deleting
|
||||
let poll = try await fetchPoll(byId: pollId)
|
||||
let userId = try await getCurrentUserRecordID()
|
||||
guard poll.ownerId == userId else {
|
||||
throw PollError.notPollOwner
|
||||
}
|
||||
|
||||
let recordID = CKRecord.ID(recordName: pollId.uuidString)
|
||||
|
||||
do {
|
||||
@@ -193,6 +200,8 @@ actor PollService {
|
||||
try await publicDatabase.deleteRecord(withID: recordID)
|
||||
} catch let error as CKError {
|
||||
throw mapCloudKitError(error)
|
||||
} catch let error as PollError {
|
||||
throw error
|
||||
} catch {
|
||||
throw PollError.unknown(error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user