Fix invalid syntax for node in server ShelfController

This commit is contained in:
Robbie Antenesse 2020-01-15 16:57:27 -07:00
parent 7d77a5a8f5
commit 6e16b36d49
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import fetch from 'node-fetch';
const fetch = require('node-fetch');
class ShelfController {
constructor (shelfModel, shelfItemModel) {
@ -24,7 +24,7 @@ class ShelfController {
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());
// validate response somehow
return response;