@@ -10,13 +10,16 @@ import Foundation
1010import Alamofire
1111
1212class Model{
13− static var url = URL(string:"https://valera-denis.herokuapp.com/authenticate")!
14− static var url1 = URL(string:"https://valera-denis.herokuapp.com/posts/last")!
15− static var urlForDrafts = URL(string:"https://valera-denis.herokuapp.com/drafts/create")!
16− static var urlForPublish = URL(string:"https://valera-denis.herokuapp.com/drafts/publish")!
17− static var urlForUpdate = URL(string:"https://valera-denis.herokuapp.com/drafts/update")!
18− static var urlForPostsForUser = URL(string:"https://valera-denis.herokuapp.com/posts/forUser")!
19− static var urlForUsers = URL(string:"https://valera-denis.herokuapp.com/users")!
13+
14+ private static let baseUrl = "https://valera-denis.herokuapp.com"
15+
16+ static let url = URL(string:"\(baseUrl)/authenticate")!
17+ static let url1 = URL(string:"\(baseUrl)/posts/last")!
18+ static let urlForDrafts = URL(string:"\(baseUrl)/drafts/create")!
19+ static let urlForPublish = URL(string:"\(baseUrl)/drafts/publish")!
20+ static let urlForUpdate = URL(string:"\(baseUrl)/drafts/update")!
21+ static let urlForPostsForUser = URL(string:"\(baseUrl)/posts/forUser")!
22+ static let urlForUsers = URL(string:"\(baseUrl)/users")!
2023
2124 struct Posts: Codable {
2225 var body: [Attachments]