DB Models for Image, Album, based on Data
This commit is contained in:
1 parent
b829885b00
commit
b69c19239e
5 files changed
+106
-16
No files matched your search
@@ -0,0 +1,12 @@
|
||||
const Data = require('./Data')
|
||||
const {findOne} = require('../lib/store')
|
||||
|
||||
const store = () => Data.getStore(Image)
|
||||
|
||||
class Image {
|
||||
static async findById(id) {
|
||||
return findOne(store(), {_id: id})
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Image
|
||||
Reference in new issue
Block a user