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.
28 lines
510 B
28 lines
510 B
//
|
|
// BetEndingValidationViewModel.swift
|
|
// AllIn
|
|
//
|
|
// Created by Emre on 07/02/2024.
|
|
//
|
|
|
|
import Foundation
|
|
import DependencyInjection
|
|
import Model
|
|
|
|
class BetEndingValidationViewModel: ObservableObject {
|
|
|
|
var id: String
|
|
@Inject var manager: Manager
|
|
@Published var selectedAnswer : String?
|
|
|
|
init(id: String) {
|
|
self.id = id
|
|
}
|
|
|
|
func post() {
|
|
if let answer = selectedAnswer {
|
|
manager.addResponse(withIdBet: id, andResponse: answer)
|
|
}
|
|
}
|
|
}
|