+ instagram middleware

This commit is contained in:
tmshv committed 2016-03-23 02:09:33 +03:00
1 parent acffe28a33
commit e80e2164ab
1 file changed
+12
@@ -0,0 +1,12 @@
import {api} from '../instagram';
export default function () {
return async(ctx, next) => {
var code = ctx.session.accessToken;
if (code) {
ctx.instagram = api(code);
}
await next();
}
}