forked from Mirrors/doipjs
Handle requests without URI
This commit is contained in:
parent
bd7bee7aff
commit
6b40902a8f
1 changed files with 4 additions and 0 deletions
|
@ -72,6 +72,10 @@ const match = (uri, opts) => {
|
||||||
const directRequestHandler = (spData, opts) => {
|
const directRequestHandler = (spData, opts) => {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
const url = spData.proof.fetch ? spData.proof.fetch : spData.proof.uri
|
const url = spData.proof.fetch ? spData.proof.fetch : spData.proof.uri
|
||||||
|
if (!url) {
|
||||||
|
reject('No valid URI provided')
|
||||||
|
return
|
||||||
|
}
|
||||||
let res
|
let res
|
||||||
|
|
||||||
switch (spData.proof.format) {
|
switch (spData.proof.format) {
|
||||||
|
|
Loading…
Reference in a new issue