WIP
This commit is contained in:
@@ -68,18 +68,5 @@ struct AllWorkoutsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
func testParse() {
|
||||
if let filepath = Bundle.main.path(forResource: "AllWorkouts", ofType: "json") {
|
||||
do {
|
||||
let data = try Data(NSData(contentsOfFile: filepath))
|
||||
let workout = try JSONDecoder().decode([Workout].self, from: data)
|
||||
self.workouts = workout
|
||||
} catch {
|
||||
print(error)
|
||||
fatalError()
|
||||
}
|
||||
} else {
|
||||
fatalError()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user