mirror of
https://github.com/certd/certd.git
synced 2026-04-15 05:00:52 +08:00
16 lines
361 B
TypeScript
16 lines
361 B
TypeScript
import dayjs from "dayjs";
|
|
|
|
export const ZoneOptions = [{ value: "cn-hangzhou" }];
|
|
export function appendTimeSuffix(name: string) {
|
|
if (name == null) {
|
|
name = "certd";
|
|
}
|
|
return name + "-" + dayjs().format("YYYYMMDD-HHmmss");
|
|
}
|
|
|
|
export function checkRet(ret: any) {
|
|
if (ret.code != null) {
|
|
throw new Error("执行失败:" + ret.Message);
|
|
}
|
|
}
|