Yuki Takei 1 год назад
Родитель
Сommit
ff689e6752

+ 1 - 2
apps/app/src/features/questionnaire/server/util/convert-to-legacy-format.ts

@@ -13,8 +13,7 @@ function isLegacy<T extends { growiInfo: any }>(data: T): data is IHasGrowiAppIn
   return !('additionalInfo' in data.growiInfo);
 }
 
-export function getSiteUrlHashed(_siteUrl: string | undefined): string {
-  const siteUrl = _siteUrl ?? '[The site URL is not set. Please set it!]';
+export function getSiteUrlHashed(siteUrl: string): string {
   const hasher = crypto.createHash('sha256');
   hasher.update(siteUrl);
   return hasher.digest('hex');

+ 2 - 2
apps/app/src/server/service/growi-info/growi-info.ts

@@ -27,12 +27,12 @@ export class GrowiInfoService {
    * With version 3.2.4 to 3.3.4, the system uses the auto-generated site URL only if the config is not set.
    * With version 3.3.5 and above, the system use only a value from the config.
    */
-  private getSiteUrl(): string | undefined {
+  getSiteUrl(): string {
     const siteUrl = configManager.getConfig('app:siteUrl');
     if (siteUrl != null) {
       return pathUtils.removeTrailingSlash(siteUrl);
     }
-    return siteUrl;
+    return siteUrl ?? '[The site URL is not set. Please set it!]';
   }
 
   /**