first commit

This commit is contained in:
zzc
2026-01-09 11:21:29 +08:00
commit 24e6484860
29 changed files with 1930 additions and 0 deletions

26
app/controller/image.js Normal file
View File

@@ -0,0 +1,26 @@
const { getLogger, imageUtil, qiniuUtil } = require("../../util");
const logger = getLogger("image");
const path = require("path");
const Merge = async (call, callback) => {
const { name } = call.request;
logger.info({ name }, "参数");
const buffer = await imageUtil.mergeImage(name);
console.log(11111, buffer);
// const file = await qiniuUtil.uploadFileByBuffer(buffer)
callback(null, { path: "success" });
};
const CreateAvatarOrnament = async (call, callback) => {
const { avatarPath, ornamentPath } = call.request;
logger.info({ avatarPath, ornamentPath }, "参数");
const buffer = await imageUtil.avatarOrnament(avatarPath, ornamentPath);
// console.log(11111, buffer);
// const file = await qiniuUtil.uploadFileByBuffer(buffer)
callback(null, { path: "success" });
};
module.exports = {
Merge,
CreateAvatarOrnament,
};