mirror of
https://github.com/lux-tel/session-ios.git
synced 2026-10-30 20:38:32 +00:00
• 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
30 lines
941 B
Swift
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"
|
|
}
|
|
}
|
|
}
|
|
}
|