Skip to content

Commit

Permalink
chore: api 테스트를 위한 주석 해제
Browse files Browse the repository at this point in the history
  • Loading branch information
lavi27 committed Jan 19, 2024
1 parent 4f7ca86 commit c39f6fd
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
9 changes: 4 additions & 5 deletions pages/dashboard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ definePageMeta({
const initChartEvent = useEventBus('initInviteURLUsageChart')
const route = useRoute()
const API = useAPI()
// const { alertsData, loadPush, checkPush, onPushCheck } = useSocketAlert()
const alertsData = useState<APIAlert[]>()
const { alertsData, loadPush, checkPush, onPushCheck } = useSocketAlert()
const { loadingSuccess } = useLoadingState()
Expand Down Expand Up @@ -200,12 +199,12 @@ onMounted(async () => {
try {
summaryData.value = await API.get.summary()
// loadPush(Number(route.query.id))
loadPush(Number(route.query.id))
// onPushCheck(resizeAlerts)
onPushCheck(resizeAlerts)
alertInterval.value = setInterval(() => {
// checkPush(Number(route.query.id))
checkPush(Number(route.query.id))
}, 5000)
await wait(100)
Expand Down
42 changes: 24 additions & 18 deletions pages/dashboard/invite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@
</template>

<script setup lang="ts">
import { APIInviteType } from '~/utils/enums'
definePageMeta({
middleware: ['auth', 'guild-id'],
})
Expand Down Expand Up @@ -287,10 +289,10 @@ const clickCustomDomain = () => {
modalShow(MODAL.premiereOnly)
}
const checkVote = () => {
// this.connState = 0
// location.reload()
}
// const checkVote = () => {
// this.connState = 0
// location.reload()
// }
const reconfirmSaveSettings = async () => {
if (setting.value.inviteLink.enabled && setting.value.inviteLink.settings.inviteURL.value != '') {
modalShow(MODAL.customDomain)
Expand All @@ -299,20 +301,24 @@ const reconfirmSaveSettings = async () => {
}
}
const saveSettings = async () => {
// try {
// await API.post.invite({
// settings: this.select.method.index + 2,
// status: this.switch_.invite,
// link: this.select.link,
// domain: {
// domain: this.switch_.domain ? this.select.domain : '',
// ssl: this.switch_.domain ? this.switch_.domain_ssl : null,
// },
// })
// modalShowAndClose(MODAL.success, 3000)
// } catch (e) {
// modalShowAndClose(MODAL.failed, 3000)
// }
try {
const { inviteLink } = setting.value
// await API.post.invite({
// settings: (inviteLink.settings.inviteMethod.index + 2) as APIInviteType,
// status: inviteLink.enabled,
// link: inviteLink.settings.inviteURL.value,
// domain: {
// domain: this.switch_.domain ? this.select.domain : '',
// ssl: this.switch_.domain ? this.switch_.domain_ssl : null,
// },
// })
//FIXME - domain??
modalShowAndClose(MODAL.success, 3000)
} catch (e) {
modalShowAndClose(MODAL.failed, 3000)
}
}
onMounted(async () => {
Expand Down
21 changes: 12 additions & 9 deletions pages/dashboard/verify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,18 @@ const setInputMenuIndex = (index: string) => {
}
const saveSettings = async () => {
// try {
// await API.post.verify({
// status: this.switch_.confirm,
// role: this.input.role,
// })
// modalShowAndClose(MODAL.success, 3000)
// } catch (e) {
// modalShowAndClose(MODAL.failed, 3000)
// }
try {
const { cmdVerify } = setting.value
await API.post.verify({
status: cmdVerify.enabled,
role: cmdVerify.settings.verifyRole.selectedData,
})
modalShowAndClose(MODAL.success, 3000)
} catch (e) {
modalShowAndClose(MODAL.failed, 3000)
}
}
onMounted(async () => {
Expand Down

0 comments on commit c39f6fd

Please sign in to comment.