+ instagram middleware
This commit is contained in:
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user