2017-11-27 10:59:24 +01:00
|
|
|
module.exports = async (ctx, next) => {
|
2017-11-27 16:47:16 +01:00
|
|
|
if (!ctx.state.user) {
|
2018-01-17 18:50:12 +01:00
|
|
|
return ctx.unauthorized();
|
2017-11-27 12:05:18 +01:00
|
|
|
}
|
2017-11-27 16:47:16 +01:00
|
|
|
|
|
|
|
await next();
|
2017-11-27 10:59:24 +01:00
|
|
|
};
|