mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Hotfix for invalid schema
This commit is contained in:
parent
144e9d7b43
commit
d6b9d5bec9
1 changed files with 8 additions and 1 deletions
|
@ -116,7 +116,7 @@ const apiProfileSchema = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
claim: {
|
claim: {
|
||||||
type: ["array", "object"],
|
type: "object",
|
||||||
properties: {
|
properties: {
|
||||||
format: { type: "string" },
|
format: { type: "string" },
|
||||||
relation: { type: "string" },
|
relation: { type: "string" },
|
||||||
|
@ -230,6 +230,13 @@ const sanitize = (data) => {
|
||||||
for (let iClaim = 0; iClaim < user.claims.length; iClaim++) {
|
for (let iClaim = 0; iClaim < user.claims.length; iClaim++) {
|
||||||
const claim = user.claims[iClaim]
|
const claim = user.claims[iClaim]
|
||||||
|
|
||||||
|
// TODO Fix upstream
|
||||||
|
for (let iMatch = 0; iMatch < claim.matches.length; iMatch++) {
|
||||||
|
const match = claim.matches[iMatch];
|
||||||
|
if (Array.isArray(match.claim)) {
|
||||||
|
match.claim = match.claim[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
// TODO Fix upstream
|
// TODO Fix upstream
|
||||||
if (!claim.verification) {
|
if (!claim.verification) {
|
||||||
claim.verification = {}
|
claim.verification = {}
|
||||||
|
|
Loading…
Reference in a new issue