const db = uniCloud.database()
const crypto = require('crypto')
exports.main = async (event, context) => {
let hash = crypto.createHash('sha1').update('ABC123').digest('hex')
let basis = await db.collection('basisYear').add({
textencrypted:hash,
time:parseInt(new Date().getFullYear()),
})
return basis
};