only accept either an email or an assertion
This commit is contained in:
Родитель
a0cd7db37a
Коммит
64e1a6e169
|
@ -21,8 +21,8 @@ exports.routes = [
|
||||||
pre: [ prereqs.assertion, prereqs.userId, prereqs.user ],
|
pre: [ prereqs.assertion, prereqs.userId, prereqs.user ],
|
||||||
validate: {
|
validate: {
|
||||||
schema: {
|
schema: {
|
||||||
assertion: Str(),
|
assertion: Str().without('email'),
|
||||||
email: Str()
|
email: Str().without('assertion')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
response: {
|
response: {
|
||||||
|
|
|
@ -16,8 +16,8 @@ var getConfig = {
|
||||||
pre: [ prereqs.assertionGet, prereqs.userId, prereqs.user ],
|
pre: [ prereqs.assertionGet, prereqs.userId, prereqs.user ],
|
||||||
validate: {
|
validate: {
|
||||||
query: {
|
query: {
|
||||||
assertion: Str(),
|
assertion: Str().without('email'),
|
||||||
email: Str()
|
email: Str().without('assertion')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
response: {
|
response: {
|
||||||
|
@ -38,8 +38,8 @@ exports.routes = [
|
||||||
pre: [ prereqs.assertion ],
|
pre: [ prereqs.assertion ],
|
||||||
validate: {
|
validate: {
|
||||||
schema: {
|
schema: {
|
||||||
assertion: Str(),
|
assertion: Str().without('email'),
|
||||||
email: Str()
|
email: Str().without('assertion')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
response: {
|
response: {
|
||||||
|
@ -72,8 +72,8 @@ exports.routes = [
|
||||||
pre: [ prereqs.assertion, prereqs.userId ],
|
pre: [ prereqs.assertion, prereqs.userId ],
|
||||||
validate: {
|
validate: {
|
||||||
schema: {
|
schema: {
|
||||||
assertion: Str(),
|
assertion: Str().without('email'),
|
||||||
email: Str()
|
email: Str().without('assertion')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
response: {
|
response: {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче