File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33// SPDX-License-Identifier: GPL-3.0-or-later
44
55public struct NKClientIntegrationUIResponse : Codable {
6- let version : Double
7- let root : RootContainer
6+ public let ocs : OCSContainer
7+ }
8+
9+ public struct OCSContainer : Codable {
10+ public let meta : Meta
11+ public let data : ResponseData
12+ }
13+
14+ public struct Meta : Codable {
15+ public let status : String
16+ public let statuscode : Int
17+ public let message : String
18+ }
19+
20+ public struct ResponseData : Codable {
21+ // TODO: add after
22+ // public let version: String
23+ public let tooltip : String ?
824}
925
1026public struct RootContainer : Codable {
11- let orientation : String
12- let rows : [ Row ]
27+ public let orientation : String
28+ public let rows : [ Row ]
1329}
1430
1531public struct Row : Codable {
16- let children : [ Child ]
32+ public let children : [ Child ]
1733}
1834
1935public struct Child : Codable {
20- let element : String
21- let text : String ?
22- let url : String ?
36+ public let element : String
37+ public let text : String ?
38+ public let url : String ?
2339}
Original file line number Diff line number Diff line change @@ -134,13 +134,17 @@ public extension NextcloudKit {
134134 queryParams = qp
135135 }
136136
137- guard let fullURL = URL ( string: nkSession. urlBase + url) else {
137+ let fullURLString = nkSession. urlBase + url
138+ let finalURLString = fullURLString. replacingOccurrences ( of: " { \( NKClientIntegration . Params. fileId. rawValue) } " , with: fileId)
139+ . replacingOccurrences ( of: " { \( NKClientIntegration . Params. filePath. rawValue) } " , with: filePath)
140+
141+ guard let finalURL = URL ( string: finalURLString) else {
138142 return ( account, nil , NKError . urlError)
139143 }
140144
141145 let taskDescription = options. taskDescription
142146
143- let request = unauthorizedSession. request ( fullURL ,
147+ let request = unauthorizedSession. request ( finalURL ,
144148 method: httpMethod,
145149 parameters: queryParams,
146150 encoding: URLEncoding . queryString,
You can’t perform that action at this time.
0 commit comments