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.
Apple/Sources/AllInApp/AllIn/ViewModels/CurrentBetViewModel.swift

29 lines
470 B

//
// CurrentBetViewModel.swift
// AllIn
//
// Created by Emre on 31/01/2024.
//
import Foundation
import DependencyInjection
import Model
class CurrentBetViewModel: ObservableObject {
@Inject var manager: Manager
@Published private(set) var bets: [Bet] = []
init() {
getItems()
}
func getItems() {
manager.getCurrentBets(withIndex: 0, withCount: 20) { bets in
self.bets = bets
}
}
}