mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-13 03:21:20 +00:00
changed google drive link slightly.
This commit is contained in:
parent
cae5a9bf33
commit
eff70d8720
3 changed files with 14 additions and 13 deletions
|
|
@ -74,10 +74,6 @@ export default {
|
|||
);
|
||||
window.onmessage = async e => {
|
||||
consentWindow.close();
|
||||
if (!e.data.code) return;
|
||||
const url = new URL(e.data.code);
|
||||
const code = url.searchParams.get("code");
|
||||
await settingsService.GDriveAuth(code);
|
||||
};
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ export default {
|
|||
GDriveURL () {
|
||||
return wrapper(instance().get('/settings/drive/url'));
|
||||
},
|
||||
GDriveAuth (code) {
|
||||
return wrapper(instance().post('/settings/drive/auth', {code}));
|
||||
GDriveAuth (code, token) {
|
||||
return wrapper(instance().post('/settings/drive/auth', {code, token}));
|
||||
},
|
||||
setApperance (apperance, boolean) {
|
||||
return wrapper(instance().put('/settings/apperance', {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,19 @@
|
|||
<template>
|
||||
<div>
|
||||
Redirecting...
|
||||
</div>
|
||||
<div>Redirecting...</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import settingsService from "../services/settingsService.js";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
window.opener.postMessage({code: location.href}, "*");
|
||||
}
|
||||
}
|
||||
async mounted() {
|
||||
const url = new URL(location.href);
|
||||
const token = url.searchParams.get("token");
|
||||
const code = url.searchParams.get("code");
|
||||
await settingsService.GDriveAuth(code, token);
|
||||
|
||||
window.opener.postMessage({ status: 'done' }, "*");
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue