session-ios/SessionMessagingKit/File Server/Types/FSEndpoint.swift
Morgan Pretty 1c474955de File upload working, further code cleanup
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)
2022-03-04 13:33:06 +11:00

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"
}
}
}
}