mirror of
https://github.com/langgenius/dify.git
synced 2026-10-04 13:47:55 +08:00
feat(api,cli): strict UUID validation for app-id and workspace-id (#37212)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
686e643632
commit
1502a57381
19 files changed
+99
-92
No files matched your search
+1
-4
@@ -32,13 +32,10 @@ export class AppsClient {
|
||||
})
|
||||
}
|
||||
|
||||
async describe(appId: string, workspaceId: string, fields?: readonly string[]): Promise<AppDescribeResponse> {
|
||||
async describe(appId: string, fields?: readonly string[]): Promise<AppDescribeResponse> {
|
||||
return this.orpc.apps.byAppId.describe.get({
|
||||
params: { app_id: appId },
|
||||
query: {
|
||||
workspace_id: workspaceId,
|
||||
// The backend parses a comma-separated string (validator splits on ','); the contract
|
||||
// types `fields` as a string accordingly, so join here rather than send an array.
|
||||
fields: fields !== undefined && fields.length > 0 ? fields.join(',') : undefined,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user