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

Adapting for new V5 skills api #5

Merged
merged 8 commits into from
Aug 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Using updated getV5SkillResource method
  • Loading branch information
vikasrohit authored Aug 18, 2021
commit 85305a41f6c61750e5f8b539384f1457fd90e9c5
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const helper = require('./src/common/helper')
*/
async function syncUserSkill(userId, tagId, score, taxonomyId, isDelete) {
const name = await helper.getTagName(tagId)
const skill = await helper.getUbahnResource('skills', { taxonomyId, name })
const skill = await helper.getV5SkillResource('skills', { taxonomyId, name })
const skillExist = await helper.checkUserSkillExist(userId, skill.id)
if (isDelete && skillExist) {
helper.deleteUserSkill(userId, skill.id)
Expand All @@ -35,7 +35,7 @@ async function syncUserSkill(userId, tagId, score, taxonomyId, isDelete) {
module.exports.handle = async (event) => {
try {
console.log(`Received event: `, JSON.stringify(event))
const taxonomy = await helper.getUbahnResource('taxonomies', { name: config.TAXONOMY_NAME })
const taxonomy = await helper.getV5SkillResource('taxonomies', { name: config.TAXONOMY_NAME })
for (const record of event.Records) {
try {
const handle = _.get(record, 'dynamodb.NewImage.userHandle.S')
Expand Down