Skip to content

Commit

Permalink
feat: Add addAuthor method and change func name getUserRawAudioFile t…
Browse files Browse the repository at this point in the history
…o getUserInputAudio

see: #10
  • Loading branch information
sujinleeme committed Jun 30, 2018
1 parent 0ed92f7 commit fa33d85
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/models/InputAudio.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ let InputAudioSchema = new mongoose.Schema(
}
)

InputAudioSchema.methods.getUserRawAudioFile = (_id) => {
InputAudioSchema.methods.addAuthor = (author_id) => {
this.author = author_id
return this.save()
}

InputAudioSchema.methods.getUserInputAudio = (_id) => {
InputAudioSchema.find({'author': _id}).then((audio) => {
"use strict"
return audio
Expand Down

0 comments on commit fa33d85

Please sign in to comment.