All checks were successful
deploy to server / build-and-deploy (push) Successful in 2m54s
- 将baseURL由directus_url转为directus_public_url
16 lines
456 B
TypeScript
16 lines
456 B
TypeScript
import { companyProfileService } from '~~/server/services/cms/companyProfileService';
|
|
|
|
export default defineEventHandler(async (event) => {
|
|
const locale = getHeader(event, 'x-locale') || 'zh-CN';
|
|
|
|
const companyProfile = await companyProfileService.getCompanyProfile(locale);
|
|
|
|
companyProfile.content = rewriteAssetUrls(
|
|
companyProfile.content,
|
|
useRuntimeConfig().public.directus.publicUrl,
|
|
'/api/assets'
|
|
);
|
|
|
|
return companyProfile;
|
|
});
|