(licenses []database.License)
| 349 | } |
| 350 | |
| 351 | func convertLicenses(licenses []database.License) ([]codersdk.License, error) { |
| 352 | out := make([]codersdk.License, 0, len(licenses)) |
| 353 | for _, l := range licenses { |
| 354 | c, err := decodeClaims(l) |
| 355 | if err != nil { |
| 356 | return nil, err |
| 357 | } |
| 358 | out = append(out, convertLicense(l, c)) |
| 359 | } |
| 360 | return out, nil |
| 361 | } |
| 362 | |
| 363 | // decodeClaims decodes the JWT claims from the stored JWT. Note here we do not validate the JWT |
| 364 | // and just return the claims verbatim. We want to include all licenses on the GET response, even |
no test coverage detected