16 lines
450 B
TypeScript
16 lines
450 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.url,
|
|
'/api/assets'
|
|
);
|
|
|
|
return companyProfile;
|
|
});
|