mirror of
https://github.com/labring/laf.git
synced 2026-01-25 16:07:45 +00:00
276 B
276 B
@lafjs/cloud is used in cloud function, exposing resource objects to cloud function.
import cloud from '@lafjs/cloud'
exports.main = async function (ctx) {
const db = cloud.database()
const res = await db.collection('messages').get()
return res.data
}