forked from baron/baron-sso
RP 공개키 등록 UI 및 SSH-RSA 자동 변환 기능 구현
This commit is contained in:
@@ -122,10 +122,11 @@ function formatTemplate(
|
||||
template: string,
|
||||
vars?: Record<string, string | number>,
|
||||
): string {
|
||||
const normalizedTemplate = template.replace(/\\n/g, "\n");
|
||||
if (!vars) {
|
||||
return template;
|
||||
return normalizedTemplate;
|
||||
}
|
||||
return template.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, key) => {
|
||||
return normalizedTemplate.replace(/\{\{\s*(\w+)\s*\}\}/g, (match, key) => {
|
||||
const value = vars[key];
|
||||
if (value === undefined || value === null) {
|
||||
return match;
|
||||
|
||||
Reference in New Issue
Block a user