Move API endpoints to /api
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
const BlacklistAPI = require("../../BlacklistAPI");
|
||||
|
||||
function withBlacklist(blacklist, callback) {
|
||||
return Promise.all(blacklist.map(BlacklistAPI.addPackage)).then(callback);
|
||||
function withBlacklist(blacklist, done) {
|
||||
Promise.all(blacklist.map(BlacklistAPI.addPackage)).then(done);
|
||||
}
|
||||
|
||||
module.exports = withBlacklist;
|
||||
|
@ -1,10 +1,10 @@
|
||||
const withToken = require("./withToken");
|
||||
const AuthAPI = require("../../AuthAPI");
|
||||
|
||||
function withRevokedToken(scopes, callback) {
|
||||
function withRevokedToken(scopes, done) {
|
||||
withToken(scopes, token => {
|
||||
AuthAPI.revokeToken(token).then(() => {
|
||||
callback(token);
|
||||
done(token);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
const AuthAPI = require("../../AuthAPI");
|
||||
|
||||
function withToken(scopes, callback) {
|
||||
AuthAPI.createToken(scopes).then(callback);
|
||||
function withToken(scopes, done) {
|
||||
AuthAPI.createToken(scopes).then(done);
|
||||
}
|
||||
|
||||
module.exports = withToken;
|
||||
|
Reference in New Issue
Block a user