From 9eb9e7b5e49ee8b024a809d4a632b7746d903ff5 Mon Sep 17 00:00:00 2001 From: Ishaan Mathur Date: Mon, 6 Nov 2023 17:02:02 -0600 Subject: [PATCH 1/5] fixed attendee event endpoint --- HIAPI/Models/Event.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HIAPI/Models/Event.swift b/HIAPI/Models/Event.swift index d61c64a1..8eda691c 100644 --- a/HIAPI/Models/Event.swift +++ b/HIAPI/Models/Event.swift @@ -66,7 +66,7 @@ public struct StaffEvent: Codable { public struct Event: Codable { internal enum CodingKeys: String, CodingKey { - case id + case id = "eventId" case endTime case eventType case info = "description" From 5034ab86b35de413a9920c3814df3caf74f8eacc Mon Sep 17 00:00:00 2001 From: Ishaan Mathur Date: Sun, 12 Nov 2023 13:15:51 -0600 Subject: [PATCH 2/5] Added new event endpoint GET /event/staff/ --- HIAPI/Models/Event.swift | 10 +++++----- HIAPI/Services/EventService.swift | 4 ++++ .../FlowControllers/HILoginFlowController.swift | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/HIAPI/Models/Event.swift b/HIAPI/Models/Event.swift index 8eda691c..8a47a08e 100644 --- a/HIAPI/Models/Event.swift +++ b/HIAPI/Models/Event.swift @@ -35,7 +35,7 @@ public struct StaffEventContainer: Decodable, APIReturnable { public struct StaffEvent: Codable { internal enum CodingKeys: String, CodingKey { - case id + case id = "eventId" case endTime case eventType case info = "description" @@ -55,12 +55,12 @@ public struct StaffEvent: Codable { public let info: String public let locations: [Location] public let name: String - public let sponsor: String + public let sponsor: String? public let startTime: Date - public let points: Int + public let points: Int? public let isAsync: Bool - public let isPrivate: Bool - public let displayOnStaffCheckin: Bool + public let isPrivate: Bool? + public let displayOnStaffCheckin: Bool? } diff --git a/HIAPI/Services/EventService.swift b/HIAPI/Services/EventService.swift index 7205fc3f..121553a8 100644 --- a/HIAPI/Services/EventService.swift +++ b/HIAPI/Services/EventService.swift @@ -24,6 +24,10 @@ public class EventService: BaseService { return APIRequest(service: self, endpoint: "event/", method: .GET) } + public static func getStaffEvents() -> APIRequest { + return APIRequest(service: self, endpoint: "event/staff/", method: .GET) + } + public static func checkIn(code: String) -> APIRequest { var body = HTTPBody() body["code"] = code diff --git a/HackIllinois/FlowControllers/HILoginFlowController.swift b/HackIllinois/FlowControllers/HILoginFlowController.swift index 0d6bcdb2..4bb6d5f5 100644 --- a/HackIllinois/FlowControllers/HILoginFlowController.swift +++ b/HackIllinois/FlowControllers/HILoginFlowController.swift @@ -38,6 +38,7 @@ class HILoginFlowController: UIViewController { // prevents the login session from going out of scope during presentation var loginSession: ASWebAuthenticationSession? + var eventsSession: ASWebAuthenticationSession? // MARK: ViewControllers lazy var loginSelectionViewController = HILoginSelectionViewController(delegate: self) @@ -103,6 +104,7 @@ private extension HILoginFlowController { } return } + let loginURL = HIAPI.AuthService.oauthURL(provider: user.provider) NSLog(loginURL.description) loginSession = ASWebAuthenticationSession(url: loginURL, callbackURLScheme: "hackillinois", completionHandler: { [weak self] (url, error) in From 699f66ea5850962836382e5c3f2c936ee6851720 Mon Sep 17 00:00:00 2001 From: Ishaan Mathur Date: Mon, 4 Dec 2023 01:39:28 -0600 Subject: [PATCH 3/5] got attendee login fixes --- HackIllinois.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HackIllinois.xcodeproj/project.pbxproj b/HackIllinois.xcodeproj/project.pbxproj index a7a34728..c79758d9 100644 --- a/HackIllinois.xcodeproj/project.pbxproj +++ b/HackIllinois.xcodeproj/project.pbxproj @@ -1302,7 +1302,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2024.1.3; + MARKETING_VERSION = 2024.1.4; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -Xfrontend -warn-long-expression-type-checking=150"; PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios; @@ -1333,7 +1333,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2024.1.3; + MARKETING_VERSION = 2024.1.4; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios; PRODUCT_NAME = "$(TARGET_NAME)"; From a9cea7ded2aa380668e6e1490bd75fee15732ab1 Mon Sep 17 00:00:00 2001 From: Ishaan Mathur Date: Mon, 4 Dec 2023 20:04:48 -0600 Subject: [PATCH 4/5] can now see events --- .../DataSources/HITimeDataSource.swift | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/HackIllinois/DataSources/HITimeDataSource.swift b/HackIllinois/DataSources/HITimeDataSource.swift index e0c1a813..a6e0111f 100644 --- a/HackIllinois/DataSources/HITimeDataSource.swift +++ b/HackIllinois/DataSources/HITimeDataSource.swift @@ -18,16 +18,16 @@ final class HITimeDataSource { static var shared = HITimeDataSource() public static let defaultTimes = EventTimes( - eventStart: Date(timeIntervalSince1970: 1677272400), // Friday, February 25, 2023 6:00:00 PM CST - eventEnd: Date(timeIntervalSince1970: 1677445200), // Sunday, February 27, 2023 4:00:00 PM CST - hackStart: Date(timeIntervalSince1970: 1677286800), // Friday, February 25, 2023 7:00:00 PM CST - hackEnd: Date(timeIntervalSince1970: 1677423600), // Sunday, February 27, 2023 10:00:00 AM CST - fridayStart: Date(timeIntervalSince1970: 1677218400), // Friday, February 25, 2023 12:00:00 AM CST - fridayEnd: Date(timeIntervalSince1970: 1677304799), // Friday, February 25, 2023 11:59:59 PM CST - saturdayStart: Date(timeIntervalSince1970: 1677304800), // Saturday, February 26, 2023 12:00:00 AM CST - saturdayEnd: Date(timeIntervalSince1970: 1677391199), // Saturday, February 26, 2023 11:59:59 PM CST - sundayStart: Date(timeIntervalSince1970: 1677391200), // Sunday, February 27, 2023 12:00:00 AM CST - sundayEnd: Date(timeIntervalSince1970: 1677477599) // Sunday, February 27, 2023 11:59:59 PM CST + eventStart: Date(timeIntervalSince1970: 1708732800), // Friday, February 23, 2024 6:00:00 PM CST + eventEnd: Date(timeIntervalSince1970: 1708898400), // Sunday, February 25, 2024 4:00:00 PM CST + hackStart: Date(timeIntervalSince1970: 1708736400), // Friday, February 23, 2024 7:00:00 PM CST + hackEnd: Date(timeIntervalSince1970: 1708876800), // Sunday, February 25, 2024 10:00:00 AM CST + fridayStart: Date(timeIntervalSince1970: 1708668000), // Friday, February 23, 2024 12:00:00 AM CST + fridayEnd: Date(timeIntervalSince1970: 1708754399), // Friday, February 23, 2024 11:59:59 PM CST + saturdayStart: Date(timeIntervalSince1970: 1708754400), // Saturday, February 24, 2024 12:00:00 AM CST + saturdayEnd: Date(timeIntervalSince1970: 1708840799), // Saturday, February 24, 2024 11:59:59 PM CST + sundayStart: Date(timeIntervalSince1970: 1708840800), // Sunday, February 25, 2024 12:00:00 AM CST + sundayEnd: Date(timeIntervalSince1970: 1708927199) // Sunday, February 25, 2024 11:59:59 PM CST ) var eventTimes = HITimeDataSource.defaultTimes From 9c93d16ea8c7802e2cfa4ef5889d8eaa670675db Mon Sep 17 00:00:00 2001 From: Ishaan Mathur Date: Mon, 4 Dec 2023 21:36:36 -0600 Subject: [PATCH 5/5] increasing version --- HackIllinois.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HackIllinois.xcodeproj/project.pbxproj b/HackIllinois.xcodeproj/project.pbxproj index c79758d9..97e7c6f8 100644 --- a/HackIllinois.xcodeproj/project.pbxproj +++ b/HackIllinois.xcodeproj/project.pbxproj @@ -1302,7 +1302,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2024.1.4; + MARKETING_VERSION = 2024.1.5; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -Xfrontend -warn-long-expression-type-checking=150"; PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios; @@ -1333,7 +1333,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2024.1.4; + MARKETING_VERSION = 2024.1.5; ONLY_ACTIVE_ARCH = YES; PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios; PRODUCT_NAME = "$(TARGET_NAME)";