Files
cod-backend/Sources/App/Commands/RecalulateRecords.swift
2021-08-04 16:32:17 -05:00

26 lines
525 B
Swift

//
// RecalculateStatistics.swift
// RecalculateStatistics
//
// Created by Michael Simard on 8/3/21.
//
import Vapor
import Fluent
struct RecalulateRecords: Command {
struct Signature: CommandSignature {
}
var help: String {
"Recaluclates all stats with a w/l ratio"
}
func run(using context: CommandContext, signature: Signature) throws {
DBHelpers.relcalulateRecords(db: context.application.db) { message in
context.console.print(message)
}
}
}