Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
Before Width: | Height: | Size: 986 B After Width: | Height: | Size: 986 B |
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 693 B After Width: | Height: | Size: 693 B |
Before Width: | Height: | Size: 1008 B After Width: | Height: | Size: 1008 B |
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 843 B |
Before Width: | Height: | Size: 975 B After Width: | Height: | Size: 975 B |
@ -0,0 +1,27 @@
|
||||
//
|
||||
// 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)
|
||||
}
|
||||
}
|
||||
}
|