Fix invalid syntax for node in server ShelfController
This commit is contained in:
parent
7d77a5a8f5
commit
6e16b36d49
|
@ -1,4 +1,4 @@
|
||||||
import fetch from 'node-fetch';
|
const fetch = require('node-fetch');
|
||||||
|
|
||||||
class ShelfController {
|
class ShelfController {
|
||||||
constructor (shelfModel, shelfItemModel) {
|
constructor (shelfModel, shelfItemModel) {
|
||||||
|
@ -24,7 +24,7 @@ class ShelfController {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
async static CheckExternalDomainForShelf (domain, shelfId) {
|
static async CheckExternalDomainForShelf (domain, shelfId) {
|
||||||
const response = await fetch(`https://${domain}/api/shelf/get/${shelfId}/`).then(response => response.json());
|
const response = await fetch(`https://${domain}/api/shelf/get/${shelfId}/`).then(response => response.json());
|
||||||
// validate response somehow
|
// validate response somehow
|
||||||
return response;
|
return response;
|
||||||
|
|
Loading…
Reference in New Issue