Skip to content

Commit 3f371bd

Browse files
fix: re-initiate centrifugo after setting password (#40)
1 parent b8f5217 commit 3f371bd

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
77
name = "omnect-ui"
88
readme = "README.md"
99
repository = "git@github.com:omnect/omnect-ui.git"
10-
version = "0.13.2"
10+
version = "0.13.3"
1111
build = "src/build.rs"
1212

1313
[dependencies]

vue/src/pages/SetPassword.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import OmnectLogo from "../components/OmnectLogo.vue"
55
import { useCentrifuge } from "../composables/useCentrifugo"
66
77
const router = useRouter()
8-
const { initializeCentrifuge } = useCentrifuge()
8+
const { initializeCentrifuge, unsubscribeAll, disconnect } = useCentrifuge()
99
const password = ref<string>("")
1010
const repeatPassword = ref<string>("")
1111
const visible = ref(false)
@@ -44,6 +44,9 @@ onMounted(async () => {
4444
const requireSetPassword = await fetch("require-set-password")
4545
if (requireSetPassword.status !== 201) {
4646
router.push("/")
47+
} else {
48+
unsubscribeAll()
49+
disconnect()
4750
}
4851
} catch {
4952
router.push("/login")

0 commit comments

Comments
 (0)