mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
1c474955de
Got the updated file upload working Removed the legacy 'room' header Consolidated a number of types between SOGS, FileServer and general requests Updated the OnionRequestAPI to deal with a Data payload (rather than encoding it to a string and then back to data)
20 lines
498 B
Swift
20 lines
498 B
Swift
// Copyright © 2022 Rangeproof Pty Ltd. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
extension FileServerAPIV2 {
|
|
public enum Endpoint: EndpointType {
|
|
case files
|
|
case file(fileId: UInt64)
|
|
case sessionVersion
|
|
|
|
var path: String {
|
|
switch self {
|
|
case .files: return "files"
|
|
case .file(let fileId): return "files/\(fileId)"
|
|
case .sessionVersion: return "session_version"
|
|
}
|
|
}
|
|
}
|
|
}
|