fixed bug in url
Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
a517ced1cc
commit
bfb721bfd9
@ -6,14 +6,14 @@
|
|||||||
//
|
//
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
/// Service Layer for Employees
|
/// Service Layer for Employees
|
||||||
public class EmployeeService: EmployeeServiceProtocol {
|
public class EmployeeService: EmployeeServiceProtocol {
|
||||||
|
|
||||||
/// Service to get Employees
|
/// Service to get Employees
|
||||||
/// - Returns: Array of Employee Structs
|
/// - Returns: Array of Employee Structs
|
||||||
public func getEmployees() async throws -> [Employee] {
|
public func getEmployees() async throws -> [Employee] {
|
||||||
let employees: Employees = try await NetworkService.shared.fetchData(from: "https://jsonplaceholder.typicode.com/users", as: Employees.self)
|
let endpoint = "https://s3.amazonaws.com/sq-mobile-interview/employees.json"
|
||||||
|
let employees: Employees = try await NetworkService.shared.fetchData(from: endpoint, as: Employees.self)
|
||||||
return employees.employees
|
return employees.employees
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user