File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ let package = Package(
2424 . package ( url: " https://github.com/pointfreeco/swift-parsing " , revision: " 0.9.2 " ) ,
2525 . package ( url: " https://github.com/pointfreeco/swift-url-routing " , from: " 0.1.0 " ) ,
2626 . package ( url: " https://github.com/pointfreeco/vapor-routing " , from: " 0.1.0 " ) ,
27- // .package(url: "https://github.com/google/swift-benchmark", from: "0.1.1"),
2827 ] ,
2928 targets: [
3029 . target(
Original file line number Diff line number Diff line change 11//
2- // File .swift
2+ // LessonsController .swift
33//
44//
55// Created by Denys Danyliuk on 27.05.2022.
@@ -10,9 +10,9 @@ import KPIHubParser
1010
1111final class LessonsController {
1212
13- func getGroups ( for uuid : UUID , request: Request ) async throws -> LessonsResponse {
13+ func getLessons ( for groupUUID : UUID , request: Request ) async throws -> LessonsResponse {
1414 let response = try await request. client. get (
15- " http://rozklad.kpi.ua/Schedules/ViewSchedule.aspx?g= \( uuid . uuidString) "
15+ " http://rozklad.kpi.ua/Schedules/ViewSchedule.aspx?g= \( groupUUID . uuidString) "
1616 )
1717 let html = try ( response. body) . htmlString ( encoding: . utf8)
1818 let lessons = try LessonsParser ( ) . parse ( html)
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ func apiHandler(
2727 case let . campus( route) :
2828 return try await campusHandler ( request: request, route: route)
2929
30-
3130 case let . groups( route) :
3231 return try await groupsHandler ( request: request, route: route)
3332
@@ -84,6 +83,6 @@ func groupHandler(
8483 switch route {
8584 case . lessons:
8685 let controller = LessonsController ( )
87- return try await controller. getGroups ( for: uuid, request: request)
86+ return try await controller. getLessons ( for: uuid, request: request)
8887 }
8988}
You can’t perform that action at this time.
0 commit comments