mirror of
https://github.com/strapi/strapi.git
synced 2025-07-24 09:25:25 +00:00
8 lines
138 B
JavaScript
8 lines
138 B
JavaScript
module.exports = async (ctx, next) => {
|
|
if (!ctx.state.user) {
|
|
throw new Error('Authentication required.');
|
|
}
|
|
|
|
await next();
|
|
};
|