diff --git a/Sources/main.swift b/Sources/main.swift index 1529b1e..e4d834e 100755 --- a/Sources/main.swift +++ b/Sources/main.swift @@ -78,7 +78,9 @@ routes.add(method: .get, uri: "/api/v1/check", handler: { var resp = [String: String]() resp["authenticated"] = "AUTHED: \(request.user.authenticated)" - resp["SessionID"] = "SessionID: \(request.user.authDetails?.account.uniqueID)" + + let sessionIdValue: String = String(describing: request.user.authDetails?.account.uniqueID) + resp["SessionID"] = "SessionID: \(sessionIdValue)" do { try response.setBody(json: resp) @@ -96,7 +98,9 @@ routes.add(method: .get, uri: "/api/v1/nocheck", handler: { var resp = [String: String]() resp["authenticated"] = "AUTHED: \(request.user.authenticated)" - resp["authDetails"] = "DETAILS: \(request.user.authDetails)" + + let authDetailsValue: String = String(describing: request.user.authDetails) + resp["authDetails"] = "DETAILS: \(authDetailsValue)" do { try response.setBody(json: resp)