Skip to content

Commit

Permalink
chore: try to use strapi.log.info instead of console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
alcaprar authored Jul 5, 2024
1 parent dffd5b3 commit 75068bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/api/shop/controllers/shop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default factories.createCoreController('api::shop.shop', {
const shopEntity = await strapi.db
.query('api::shop.shop')
.findOne({ where: { slug: ctx.params.shop } })
console.log('shopEntity', shopEntity)
strapi.log.info('shopEntity', shopEntity)

if (!shopEntity) {
return ctx.badRequest('Shop not found', { shop: ctx.params.shop })
Expand All @@ -26,7 +26,7 @@ export default factories.createCoreController('api::shop.shop', {
return ctx.badRequest('Client not found', { client: ctx.params.client })
}

return {}
return clientEntity;
},
async lastOrder(ctx, next) {
const shop = ctx.params.shop
Expand Down

0 comments on commit 75068bd

Please sign in to comment.