api Page updated: refactor to make it looks like article
This commit is contained in:
1 parent
68b7f4225d
commit
348c3baba8
11 files changed
+160
-63
No files matched your search
@@ -2,11 +2,12 @@ import Data from './Data'
|
||||
import ImageArtifactType from './ImageArtifactType'
|
||||
import { findOne } from '../lib/store'
|
||||
import { mapOf } from '../server/lib'
|
||||
import { ObjectId } from 'mongodb'
|
||||
|
||||
const store = () => Data.getStore('Image')
|
||||
|
||||
export default class Image {
|
||||
static async findById(id) {
|
||||
static async findById(id: ObjectId) {
|
||||
const data = await findOne(store(), { _id: id })
|
||||
if (!data) return null
|
||||
|
||||
|
||||
Reference in new issue
Block a user