mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 21:44:59 +08:00
Merge remote-tracking branch 'connectai/main' into feature/using-tauri-fetch
This commit is contained in:
12
app/utils.ts
12
app/utils.ts
@@ -361,3 +361,15 @@ export function safeLocalStorage(): {
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export function getOperationId(operation: {
|
||||
operationId?: string;
|
||||
method: string;
|
||||
path: string;
|
||||
}) {
|
||||
// pattern '^[a-zA-Z0-9_-]+$'
|
||||
return (
|
||||
operation?.operationId ||
|
||||
`${operation.method.toUpperCase()}${operation.path.replaceAll("/", "_")}`
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user