Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jardel Matias committed Oct 7, 2022
1 parent 4b9ad4b commit 7fc8329
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ class BaseRepository {
}

async create(item) {
return promisify(this.schema.create)(item)
return this.schema.create(item)
}

async findOne(id) {
return promisify(this.schema.query)({ id: { eq: id }})
return this.schema.query({ id: { eq: id }}).exec()
}

async findAll(query) {
return promisify(this.schema.scan)(query)
return this.schema.scan(query).exec()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ const schema = new dynamoose.Schema({
type: String,
required: true,
},
skills: [{
skillId:{
type: String,
required: true,
}],
}
})

module.exports = dynamoose.model(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const dynamoose = require('dynamoose')
const schema = dynamoose.Schema({
const schema = new dynamoose.Schema({
id: {
type: String,
required: true,
Expand Down

0 comments on commit 7fc8329

Please sign in to comment.