Open
Conversation
davidtran
reviewed
Jan 4, 2021
| ), | ||
| cancelInvitation: combineResolvers( | ||
| isAuthenticated, | ||
| (_, { userId, teamId }) => cancelInvitation(userId, teamId), |
Contributor
There was a problem hiding this comment.
Chỗ này phải dùng user đang đăng nhập chứ không gửi userId, dùng userId sẽ dẫn tới XSS. Một user đăng nhập khác có thể cancel invitation của bất kỳ user nào trong hệ thống.
| }); | ||
| const dispatch = useDispatch() | ||
| const [InviteMemberMutation, { loading, error }] = useMutation(InviteMemberQuery); | ||
| const [CancelInvitationMutation] = useMutation(CancelInvitationQuery); |
Contributor
There was a problem hiding this comment.
mấy cái mutation nên viết thường chữ đầu tiên.
| <button type="button" className="mr-4 hover:underline hover:text-blue-800 cursor-pointer text-blue-500">Cancle</button> | ||
| <button | ||
| type="button" | ||
| onClick={() => handleAction({ type: 'cancel', member: it })} |
Contributor
There was a problem hiding this comment.
tạo function cho cái onClick
| user_id: userId, | ||
| }, { status: 'inactive' }, transaction)); | ||
|
|
||
| queries.push(updateTeamInvitation({ email: user.email }, { status: 'inactive' }, transaction)); |
Contributor
There was a problem hiding this comment.
chỗ này phải update là decline?
| export async function cancelInvitation(userId, teamId) { | ||
| let transaction; | ||
| try { | ||
| transaction = await database.transaction(); |
Contributor
There was a problem hiding this comment.
Cần kiểm tra là invitation có đang active hay không?
|
When are you planing to update this? I can see other issues also which are there. Any plan to release them? I am thinking to use this as base for my project but it seems to be not updated recently. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.