26 lines
525 B
Swift
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)
|
|
}
|
|
}
|
|
}
|