Last active
May 30, 2019 00:00
-
-
Save LazyFatArrow/a4af9465693e3fdae8d432c6e3cdb0ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Poll from '../models/poll.model' | |
export function create(data) { | |
return Poll.create(data) | |
} | |
export function findAll() { | |
return Poll.find().sort({ createdAt: -1 }) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment