mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
Handle server success
This commit is contained in:
parent
10f2da9e90
commit
ec4647e2bc
2 changed files with 15 additions and 3 deletions
|
@ -162,8 +162,8 @@ class ApiClient {
|
|||
}
|
||||
}
|
||||
|
||||
public static func reportPlaybackProgress(report: PlaybackReport, sessionId: String) {
|
||||
try? postResource(endpoint: "api/session/\(sessionId)/sync", parameters: report.asDictionary().mapValues({ value in "\(value)" }), callback: nil)
|
||||
public static func reportPlaybackProgress(report: PlaybackReport, sessionId: String, callback: @escaping (_ success: Bool) -> Void) {
|
||||
try? postResource(endpoint: "api/session/\(sessionId)/sync", parameters: report.asDictionary().mapValues({ value in "\(value)" }), callback: callback)
|
||||
}
|
||||
|
||||
public static func reportLocalPlaybackProgress(_ session: PlaybackSession, callback: @escaping (_ success: Bool) -> Void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue