13 lines
424 B
TypeScript
13 lines
424 B
TypeScript
import cloud from '@lafjs/cloud'
|
|
import Utils from "@/Utils";
|
|
export default async function (ctx: FunctionContext) {
|
|
const mjsonUrl = 'j3k323ol-colorblock-oss';
|
|
// 获取存储桶
|
|
const bucket = cloud.storage.bucket(mjsonUrl);
|
|
// 获取文件列表
|
|
const res = await bucket.readFile('apiclient_key.pem');
|
|
const data = await res.Body.transformToString()
|
|
cloud.shared.set("apiclient_key",data);
|
|
return data;
|
|
}
|