Skip to content

Commit

Permalink
Add boilerplate for NFDI4Objects
Browse files Browse the repository at this point in the history
  • Loading branch information
MontyBitto committed Mar 12, 2024
2 parents e518925 + e052b3b commit 399f88b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/backends.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class FileBackend {

export class ApiBackend {
constructor( base, log ) {
this.base = base.replace(/\/$/,"")
this.base = base.replace(/\/$/,"").replace(/\?.*/,"")
this.log = log
}

Expand Down Expand Up @@ -87,6 +87,7 @@ export class ApiBackend {

export async function initBackend({ backend, log }) {
if (backend.match(/^https?:/)) {

return new ApiBackend(backend, log)
} else {
return new FileBackend(backend, log)
Expand Down

0 comments on commit 399f88b

Please sign in to comment.