eschutho commented on code in PR #24067: URL: https://github.com/apache/superset/pull/24067#discussion_r1198416209
########## superset-frontend/src/views/CRUD/hooks.ts: ########## @@ -242,8 +243,12 @@ export function useSingleViewResource<D extends object = any>( loading: true, }); + const endpoint = + path_suffix !== '' + ? `/api/v1/${resourceName}/${resourceID}/${path_suffix}` + : `/api/v1/${resourceName}/${resourceID}`; Review Comment: nit, but maybe something like this may be a bit dryer: ``` const endpoint = `/api/v1/${resourceName}/${resourceID}${path_suffix ? `/${path_suffix}` : '' }` or const endpoint = `/api/v1/${resourceName}/${resourceID}${path_suffix && `/${path_suffix}` || ''}` ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org