Browse Source

Merge pull request #3466 from nocodb/fix/3463-resend-invite

fix(swagger): remove unnecessary request body arg from api
pull/2760/head
Raju Udava 2 years ago committed by GitHub
parent
commit
86125f322c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      packages/nc-gui-v2/components/tabs/auth/UserManagement.vue
  2. 3
      packages/nocodb-sdk/src/lib/Api.ts
  3. 14
      scripts/sdk/swagger.json

12
packages/nc-gui-v2/components/tabs/auth/UserManagement.vue

@ -128,7 +128,7 @@ const resendInvite = async (user: User) => {
if (!project.value?.id) return if (!project.value?.id) return
try { try {
await api.auth.projectUserResendInvite(project.value.id, user.id, null) await api.auth.projectUserResendInvite(project.value.id, user.id)
// Invite email sent successfully // Invite email sent successfully
message.success(t('msg.success.inviteEmailSent')) message.success(t('msg.success.inviteEmailSent'))
@ -178,8 +178,8 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
This action will remove this user from this project This action will remove this user from this project
</div> </div>
<div class="flex mt-6 justify-center space-x-2"> <div class="flex mt-6 justify-center space-x-2">
<a-button @click="showUserDeleteModal = false"> {{ $t('general.cancel') }} </a-button> <a-button @click="showUserDeleteModal = false"> {{ $t('general.cancel') }}</a-button>
<a-button type="primary" danger @click="deleteUser"> {{ $t('general.confirm') }} </a-button> <a-button type="primary" danger @click="deleteUser"> {{ $t('general.confirm') }}</a-button>
</div> </div>
</div> </div>
</a-modal> </a-modal>
@ -199,7 +199,8 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
<div class="text-gray-500">{{ $t('general.reload') }}</div> <div class="text-gray-500">{{ $t('general.reload') }}</div>
</div> </div>
</a-button> </a-button>
<a-button v-if="isUIAllowed('newUser')" size="middle" type="primary" ghost class="nc-invite-team" @click="onInvite"> <a-button v-if="isUIAllowed('newUser')" size="middle" type="primary" ghost class="nc-invite-team"
@click="onInvite">
<div class="flex flex-row justify-center items-center caption capitalize space-x-1"> <div class="flex flex-row justify-center items-center caption capitalize space-x-1">
<MdiAccountPlusOutline class="mr-1" /> <MdiAccountPlusOutline class="mr-1" />
<div>{{ $t('activity.inviteTeam') }}</div> <div>{{ $t('activity.inviteTeam') }}</div>
@ -224,7 +225,8 @@ watchDebounced(searchText, () => loadUsers(), { debounce: 300, maxWait: 600 })
</div> </div>
</div> </div>
<div v-for="(user, index) of users" :key="index" class="flex flex-row items-center border-b-1 py-2 px-2 nc-user-row"> <div v-for="(user, index) of users" :key="index"
class="flex flex-row items-center border-b-1 py-2 px-2 nc-user-row">
<div class="flex w-4/6 flex-wrap nc-user-email"> <div class="flex w-4/6 flex-wrap nc-user-email">
{{ user.email }} {{ user.email }}
</div> </div>

3
packages/nocodb-sdk/src/lib/Api.ts

@ -1091,14 +1091,11 @@ export class Api<
projectUserResendInvite: ( projectUserResendInvite: (
projectId: string, projectId: string,
userId: string, userId: string,
data: any,
params: RequestParams = {} params: RequestParams = {}
) => ) =>
this.request<any, any>({ this.request<any, any>({
path: `/api/v1/db/meta/projects/${projectId}/users/${userId}/resend-invite`, path: `/api/v1/db/meta/projects/${projectId}/users/${userId}/resend-invite`,
method: 'POST', method: 'POST',
body: data,
type: ContentType.Json,
format: 'json', format: 'json',
...params, ...params,
}), }),

14
scripts/sdk/swagger.json

@ -5562,14 +5562,7 @@
"tags": [ "tags": [
"Auth" "Auth"
], ],
"description": "Resend Invitation to a specific user", "description": "Resend Invitation to a specific user"
"requestBody": {
"content": {
"application/json": {
"schema": {}
}
}
}
} }
} }
}, },
@ -7734,7 +7727,10 @@
"type": "string" "type": "string"
}, },
"input": { "input": {
"type": ["string", "null"] "type": [
"string",
"null"
]
}, },
"creator": { "creator": {
"type": "string" "type": "string"

Loading…
Cancel
Save