Browse Source

fix(nc-gui): update custom url update swagger file

Ramesh Mane 4 days ago
parent
commit
b5b85c4e74
  1. 5
      packages/nocodb/src/controllers/views.controller.ts
  2. 50
      packages/nocodb/src/schema/swagger-v2.json
  3. 50
      packages/nocodb/src/schema/swagger.json
  4. 5
      packages/nocodb/src/services/views.service.ts

5
packages/nocodb/src/controllers/views.controller.ts

@ -150,7 +150,10 @@ export class ViewsController {
async shareViewUpdate(
@TenantContext() context: NcContext,
@Param('viewId') viewId: string,
@Body() body: ViewUpdateReqType,
@Body() body: ViewUpdateReqType & {
custom_url_path?: string;
original_url?: string;
},
@Req() req: NcRequest,
) {
return await this.viewsService.shareViewUpdate(context, {

50
packages/nocodb/src/schema/swagger-v2.json

@ -2794,8 +2794,25 @@
"content": {
"application/json": {
"schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedBaseReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
},
"examples": {
"Example 1": {
"value": {
@ -5301,7 +5318,24 @@
"content": {
"application/json": {
"schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedViewReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
}
}
},
@ -19699,14 +19733,6 @@
"type": "string",
"description": "The role given the target user",
"example": "editor"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {
@ -19867,14 +19893,6 @@
"password": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Password to restrict access"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {

50
packages/nocodb/src/schema/swagger.json

@ -3259,8 +3259,25 @@
"content": {
"application/json": {
"schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedBaseReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
},
"examples": {
"Example 1": {
"value": {
@ -5908,7 +5925,24 @@
"content": {
"application/json": {
"schema": {
"allOf":[
{
"$ref": "#/components/schemas/SharedViewReq"
},
{
"type": "object",
"properties": {
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
}
}
]
}
}
},
@ -24818,14 +24852,6 @@
"type": "string",
"description": "The role given the target user",
"example": "editor"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {
@ -24983,14 +25009,6 @@
"password": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Password to restrict access"
},
"original_url": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Original url user to redirect from custom url path"
},
"custom_url_path": {
"$ref": "#/components/schemas/StringOrNull",
"description": "Custom url path"
}
},
"x-stoplight": {

5
packages/nocodb/src/services/views.service.ts

@ -262,7 +262,10 @@ export class ViewsService {
context: NcContext,
param: {
viewId: string;
sharedView: SharedViewReqType;
sharedView: SharedViewReqType & {
custom_url_path?: string;
original_url?: string
};
user: UserType;
req: NcRequest;
},

Loading…
Cancel
Save