✨ Able to clear status on watchOS
🐛 Fix some bugs in status on watchOS
This commit is contained in:
@@ -148,9 +148,9 @@ class NetworkService {
|
||||
}
|
||||
|
||||
func createOrUpdateStatus(attitude: Int, isInvisible: Bool, isNotDisturb: Bool, label: String?, token: String, serverUrl: String) async throws -> SnAccountStatus {
|
||||
// First check if status exists
|
||||
// Check if there's already a customized status
|
||||
let existingStatus = try? await fetchAccountStatus(token: token, serverUrl: serverUrl)
|
||||
let method = existingStatus == nil ? "POST" : "PATCH"
|
||||
let method = (existingStatus?.isCustomized == true) ? "PATCH" : "POST"
|
||||
|
||||
guard let baseURL = URL(string: serverUrl) else {
|
||||
throw URLError(.badURL)
|
||||
|
||||
Reference in New Issue
Block a user