File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public struct RefreshGroupsCron: AsyncVaporCronSchedulable {
1313 public typealias T = Void
1414
1515 public static var expression : String {
16- " 0 4 * * 1,4 "
16+ " 0 4 * * 0 "
1717 }
1818
1919 public static func task( on application: Application ) async throws -> Void {
Original file line number Diff line number Diff line change @@ -20,11 +20,12 @@ public struct GroupParser: Parser {
2020
2121 public func parse( _ input: inout String ) throws -> [ Group ] {
2222
23+ let linkParser = Parse {
24+ Skip { PrefixThrough ( " ViewSchedule.aspx?g= " ) }
25+ PrefixUpTo ( " \" " ) . map { UUID ( uuidString: String ( $0) ) }
26+ }
2327 let singleIdParser = Parse {
24- Parse {
25- Skip { PrefixThrough ( " ViewSchedule.aspx?g= " ) }
26- PrefixUpTo ( " \" " ) . map { UUID ( uuidString: String ( $0) ) }
27- }
28+ linkParser
2829 Parse {
2930 " \" > "
3031 PrefixUpTo ( " < " ) . map { String ( $0) }
@@ -40,7 +41,7 @@ public struct GroupParser: Parser {
4041 let parser = Parse {
4142 OneOf {
4243 multipleIdParser
43- singleIdParser . map { [ $0 ] }
44+ linkParser . map { [ Group ( id : $0 , name : groupName ) ] }
4445 }
4546 Skip { Rest ( ) }
4647 }
You can’t perform that action at this time.
0 commit comments