        return UnitDatabaseQueries()
            .getUnits(armyId: nil, unitType: nil, conn: req)
            .flatMap(to: View.self, { units in
                let context = UnitsContext(title: "Units", units: units)
                return try req.view().render("units", context)
            })
    }

    func unitHandler(_ req: Request) throws -> Future<View> {
        let armyId = try req.parameters.next(Int.self)
        let unitId = try req.parameters.next(Int.self)

        let armyFuture = try ArmyController().getArmy(byID: armyId, conn: req)