mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
feat(webapp): redirect to group after registration with invite to group (#8540)
This commit is contained in:
parent
4e4eff8dc9
commit
d4a9694657
@ -514,6 +514,7 @@ export default shield(
|
|||||||
},
|
},
|
||||||
Group: {
|
Group: {
|
||||||
'*': isAuthenticated, // TODO - only those who are allowed to see the group
|
'*': isAuthenticated, // TODO - only those who are allowed to see the group
|
||||||
|
slug: allow,
|
||||||
avatar: allow,
|
avatar: allow,
|
||||||
name: allow,
|
name: allow,
|
||||||
about: allow,
|
about: allow,
|
||||||
|
|||||||
@ -269,7 +269,17 @@ export default {
|
|||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await this.$store.dispatch('auth/login', { email, password })
|
await this.$store.dispatch('auth/login', { email, password })
|
||||||
this.$toast.success(this.$t('login.success'))
|
this.$toast.success(this.$t('login.success'))
|
||||||
|
const { validateInviteCode } = this.sliderData.sliders[0].data.response
|
||||||
|
if (
|
||||||
|
validateInviteCode &&
|
||||||
|
validateInviteCode.invitedTo &&
|
||||||
|
validateInviteCode.invitedTo.groupType === 'public'
|
||||||
|
) {
|
||||||
|
const { invitedTo } = validateInviteCode
|
||||||
|
this.$router.push(`/groups/${invitedTo.slug}`)
|
||||||
|
} else {
|
||||||
this.$router.push('/')
|
this.$router.push('/')
|
||||||
|
}
|
||||||
this.sliderData.setSliderValuesCallback(null, {
|
this.sliderData.setSliderValuesCallback(null, {
|
||||||
sliderSettings: { buttonLoading: false },
|
sliderSettings: { buttonLoading: false },
|
||||||
})
|
})
|
||||||
|
|||||||
@ -5,6 +5,7 @@ export const validateInviteCode = () => gql`
|
|||||||
validateInviteCode(code: $code) {
|
validateInviteCode(code: $code) {
|
||||||
code
|
code
|
||||||
invitedTo {
|
invitedTo {
|
||||||
|
slug
|
||||||
groupType
|
groupType
|
||||||
name
|
name
|
||||||
about
|
about
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user