You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
523 B
31 lines
523 B
//
|
|
// DetailsViewModel.swift
|
|
// AllIn
|
|
//
|
|
// Created by Emre on 16/01/2024.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
import DependencyInjection
|
|
import Model
|
|
|
|
class DetailsViewModel: ObservableObject {
|
|
|
|
@Inject var manager: Manager
|
|
var id: String
|
|
|
|
@Published var betDetail: BetDetail?
|
|
|
|
init(id: String) {
|
|
self.id = id
|
|
getItem(withId: id)
|
|
}
|
|
|
|
func getItem(withId id: String) {
|
|
manager.getBet(withId: id) { bet in
|
|
self.betDetail = bet
|
|
}
|
|
}
|
|
}
|