From 21b04e21c4e1a559504e52e44c805a17764556f1 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Wed, 8 Dec 2021 00:07:23 +0100 Subject: [PATCH] Remove unused file --- Model/PlaylistsProvider.swift | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 Model/PlaylistsProvider.swift diff --git a/Model/PlaylistsProvider.swift b/Model/PlaylistsProvider.swift deleted file mode 100644 index aa1c53e1..00000000 --- a/Model/PlaylistsProvider.swift +++ /dev/null @@ -1,22 +0,0 @@ -import Alamofire -import Foundation -import SwiftyJSON - -final class PlaylistsProvider: DataProvider { - @Published var playlists = [Playlist]() - - let profile = Profile() - - func load(successHandler: @escaping ([Playlist]) -> Void = { _ in }) { - let headers = HTTPHeaders([HTTPHeader(name: "Cookie", value: "SID=\(profile.sid)")]) - DataProvider.request("auth/playlists", headers: headers).responseJSON { response in - switch response.result { - case let .success(value): - self.playlists = JSON(value).arrayValue.map { Playlist($0) } - successHandler(self.playlists) - case let .failure(error): - print(error) - } - } - } -}