@sumitpaul You can add next code to the file src/api/house/controllers/house.js (if you have this file, others you should find you own), You can have a try, if it doesn’t work, I will update a case to github GavinXue/strapi-study-cases: strapi use cases when study, maybe it can help someone else., You also can have a check late today.
'use strict';
const { createCoreController } = require('@strapi/strapi').factories;
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::house.house', ({ strapi }) => ({
async update(ctx) {
const response = await super.update(ctx);
// generate title
const { bed, bath, rent } = response.data.attributes
const generateTitle = `${bed} bed / ${bath} bath / ${rent} a month`
// update title to database
// method 1 (use update) also you can use other api to update title
ctx.request.body.data = { title: generateTitle }
const finalRes = await super.update(ctx)
return finalRes
}
}));