Remove unnecessary bluebird dependency
This commit is contained in:
parent
b87476abc9
commit
42b6cd5a32
9 changed files with 10437 additions and 231 deletions
|
@ -1,6 +1,5 @@
|
|||
import { parse } from 'url';
|
||||
import request from 'superagent';
|
||||
import 'superagent-bluebird-promise';
|
||||
import debuglog from 'debug';
|
||||
import urlMatch from './url';
|
||||
|
||||
|
@ -49,7 +48,7 @@ function looseMatch(needle, haystack, type, various) {
|
|||
export function* lookupId(id, type) {
|
||||
const path = `/${type}/${id}?size=xl`;
|
||||
|
||||
const { body } = yield request.get(apiRoot + path).promise();
|
||||
const { body } = yield request.get(apiRoot + path);
|
||||
if (!body || body.error) {
|
||||
const error = new Error('Not Found');
|
||||
error.status = 404;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue