Files
Morgan Pretty b11d8bc394 Started working on new reupload logic for user display pics
• Started working on the updated logic for the ReuploadUserDisplayPictureJob
• Pulled across a few changes from the refactored networking
• Pulled across the profile_updated changes from the animated profile pictures PR
2025-09-24 15:29:28 +10:00

30 lines
941 B
Swift

// Copyright © 2025 Rangeproof Pty Ltd. All rights reserved.
//
// stringlint:disable
import Foundation
public extension Network.FileServer {
enum Endpoint: EndpointType {
case file
case fileIndividual(String)
case directUrl(URL)
case sessionVersion
case extend(String)
case extendUrl(URL)
public static var name: String { "FileServer.Endpoint" }
public var path: String {
switch self {
case .file: return "file"
case .fileIndividual(let fileId): return "file/\(fileId)"
case .directUrl(let url): return url.path.removingPrefix("/")
case .sessionVersion: return "session_version"
case .extend(let fileId): return "/file/\(fileId)/extend"
case .extendUrl(let url): return "\(url.path.removingPrefix("/"))/extend"
}
}
}
}