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
519 B
31 lines
519 B
//
|
|
// BetViewModel.swift
|
|
// AllIn
|
|
//
|
|
// Created by Emre on 30/12/2023.
|
|
//
|
|
|
|
import Foundation
|
|
import DependencyInjection
|
|
import Model
|
|
import Combine
|
|
|
|
class BetViewModel: ObservableObject {
|
|
|
|
@Inject var manager: Manager
|
|
|
|
@Published private(set) var bets: [Bet] = []
|
|
|
|
init() {
|
|
getItems()
|
|
}
|
|
|
|
func getItems() {
|
|
manager.getBets(withIndex: 0, withCount: 20) { bets in
|
|
self.bets = bets
|
|
}
|
|
}
|
|
|
|
private var cancellables: Set<AnyCancellable> = []
|
|
}
|