| ... | @@ -21,6 +21,15 @@ pub const Provider = struct { | ... | @@ -21,6 +21,15 @@ pub const Provider = struct { |
| 21 | id_prop: string = "id", | 21 | id_prop: string = "id", |
| 22 | logo: string, | 22 | logo: string, |
| 23 | color: string, | 23 | color: string, |
| | 24 | |
| | 25 | pub fn domain(self: Provider) string { |
| | 26 | if (std.mem.indexOfScalar(u8, self.id, ',')) |_| { |
| | 27 | var iter = std.mem.split(u8, self.id, ","); |
| | 28 | _ = iter.next(); |
| | 29 | return iter.next().?; |
| | 30 | } |
| | 31 | return self.id; |
| | 32 | } |
| 24 | }; | 33 | }; |
| 25 | | 34 | |
| 26 | pub const Client = struct { | 35 | pub const Client = struct { |