Browse Source

refactor: project user api path correction

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1668/head
Pranav C 3 years ago
parent
commit
2a58c82b80
  1. 4
      packages/nc-gui/plugins/tele.js
  2. 11
      packages/nocodb/src/lib/noco/meta/api/projectUserApis.ts

4
packages/nc-gui/plugins/tele.js

@ -14,8 +14,8 @@ export default function({
socket.disconnect() socket.disconnect()
} }
const isUrl = $axios.defaults.baseURL.startsWith('http') const isUrl = $axios.defaults.baseURL.startsWith('http')
const url = isUrl ? $axios.defaults.baseURL : window.location.href.split(/[?#]/)[0] const url = isUrl ? $axios.defaults.baseURL : window.location.origin
const path = isUrl ? undefined : $axios.defaults.baseURL const path = isUrl ? undefined : ($axios.defaults.baseURL === '..' ? window.location.path.split('/').slice(0, -1).join('/') : $axios.defaults.baseURL)
socket = io(url, { socket = io(url, {
path, path,

11
packages/nocodb/src/lib/noco/meta/api/projectUserApis.ts

@ -249,17 +249,20 @@ async function resendInvite(req, res, next): Promise<any> {
} }
const router = Router({ mergeParams: true }); const router = Router({ mergeParams: true });
router.get('/projects/:projectId/users', ncMetaAclMw(userList, 'userList')); router.get(
'/api/v1/db/meta/projects/:projectId/users',
ncMetaAclMw(userList, 'userList')
);
router.post( router.post(
'/projects/:projectId/users', '/api/v1/db/meta/projects/:projectId/users',
ncMetaAclMw(userInvite, 'userInvite') ncMetaAclMw(userInvite, 'userInvite')
); );
router.patch( router.patch(
'/projects/:projectId/users/:userId', '/api/v1/db/meta/projects/:projectId/users/:userId',
ncMetaAclMw(projectUserUpdate, 'projectUserUpdate') ncMetaAclMw(projectUserUpdate, 'projectUserUpdate')
); );
router.delete( router.delete(
'/projects/:projectId/users/:userId', '/api/v1/db/meta/projects/:projectId/users/:userId',
ncMetaAclMw(projectUserDelete, 'projectUserDelete') ncMetaAclMw(projectUserDelete, 'projectUserDelete')
); );
export default router; export default router;

Loading…
Cancel
Save