System Information
- Strapi Version: 4.3.2
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
I trying to get user context and add author’s user id to new entry
async create(ctx) {
const { id } = await strapi.plugins["users-permissions"].services.jwt.getToken(ctx);
ctx.request.body.data["users_permissions_user"] = id;
const { data, meta } = await super.create(ctx);
return {
data,
meta,
};
},
This example doesn’t do anything tho. Am I missing something? How to make it work?