mirror of
https://github.com/p-stream/p-stream.git
synced 2026-01-11 20:10:32 +00:00
remove escaped backslashes from meta
This commit is contained in:
parent
b13d5fbdb1
commit
f09e71c16d
1 changed files with 8 additions and 1 deletions
|
|
@ -9,7 +9,14 @@ export interface MetaResponse {
|
|||
}
|
||||
|
||||
export async function getBackendMeta(url: string): Promise<MetaResponse> {
|
||||
return ofetch<MetaResponse>("/meta", {
|
||||
const meta = await ofetch<MetaResponse>("/meta", {
|
||||
baseURL: url,
|
||||
});
|
||||
|
||||
// Remove escaped backslashes before apostrophes (e.g., \' becomes ')
|
||||
return {
|
||||
...meta,
|
||||
name: meta.name.replace(/\\'/g, "'"),
|
||||
description: meta.description?.replace(/\\'/g, "'"),
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue