Browse Source

fix prettier issue

pull/2079/head
Clovin 2 years ago
parent
commit
272103ee76
3 changed files with 12 additions and 11 deletions
  1. 15
      frontend/components/auth/SocialLogin.vue
  2. 6
      frontend/pages/auth.vue
  3. 2
      frontend/repositories/auth/apiAuthRepository.ts

15
frontend/components/auth/SocialLogin.vue

@ -8,7 +8,7 @@
color="secondary"
:href="item.href"
>
Login With {{item.provider}}
Login With {{ item.provider }}
</v-btn>
</div>
</template>
@ -29,16 +29,17 @@ export default Vue.extend({
}
},
async mounted() {
const response = await this.fetchSocialLink();
const response = await this.fetchSocialLink()
this.social = Object.entries(response)
.map(([key, value]: any) => ({
provider: key,
value,
})).filter((item) => !!item.value?.authorize_url)
value
}))
.filter((item) => !!item.value?.authorize_url)
.map((item: any) => ({
...item,
href: `${item.value.authorize_url}&redirect_uri=${location.origin}${item.value.redirect_path}`,
}));
},
href: `${item.value.authorize_url}&redirect_uri=${location.origin}${item.value.redirect_path}`
}))
}
})
</script>

6
frontend/pages/auth.vue

@ -5,8 +5,8 @@
<v-row align="center" justify="center">
<v-col cols="12" sm="8" md="4">
<form-login :login="authenticateUser" />
<social-login :fetch-social-link='fetchSocialLink' />
<social-login :fetch-social-link="fetchSocialLink" />
</v-col>
</v-row>
</v-container>
@ -23,7 +23,7 @@ import SocialLogin from '@/components/auth/SocialLogin.vue'
export default Vue.extend({
components: {
FormLogin,
SocialLogin,
SocialLogin
},
methods: {

2
frontend/repositories/auth/apiAuthRepository.ts

@ -16,7 +16,7 @@ export class APIAuthRepository implements AuthRepository {
async socialLink(): Promise<any[]> {
const url = '/social/links/'
const response = await this.request.get(url);
const response = await this.request.get(url)
return response.data
}
}
Loading…
Cancel
Save