Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit 4a6787c

Browse files
committed
simplify tcskills response
1 parent 6d14055 commit 4a6787c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/modules/tcskill/service.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const joi = require('@hapi/joi')
66
const _ = require('lodash')
77

88
const errors = require('../../common/errors')
9-
const helper = require('../../common/helper')
109
const dbHelper = require('../../common/db-helper')
1110
const sequelize = require('../../models/index')
1211

@@ -28,7 +27,7 @@ async function get (id, params, query = {}) {
2827
}
2928
const skill = recordObj.dataValues
3029

31-
return helper.omitAuditFields(skill)
30+
return skill
3231
}
3332

3433
get.schema = {
@@ -45,17 +44,14 @@ async function search (query) {
4544
let items = await dbHelper.find(TCSkill, query)
4645

4746
items = items.map(item => item.dataValues)
48-
items = helper.omitAuditFields(items)
4947
return { fromDb: true, result: items, total: items.length }
5048
}
5149

5250
search.schema = {
5351
query: {
5452
page: joi.page(),
5553
perPage: joi.pageSize(),
56-
taxonomyId: joi.string().uuid(),
5754
name: joi.string(),
58-
externalId: joi.string(),
5955
orderBy: joi.string()
6056
}
6157
}

0 commit comments

Comments
 (0)