mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-22 05:27:20 +00:00
Add support for overriding subscriptions when importing.
This commit is contained in:
parent
08df4866a7
commit
f33a51e61f
@ -7,6 +7,9 @@
|
||||
<div class="uk-form-row">
|
||||
<b>Selected Subscriptions: {{ selectedSubscriptions }}</b>
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<b>Override: <input class="uk-checkbox" v-model="override" type="checkbox"/></b>
|
||||
</div>
|
||||
<div class="uk-form-row">
|
||||
<a
|
||||
class="uk-width-1-1 uk-button uk-button-primary uk-button-large uk-width-auto"
|
||||
@ -62,6 +65,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
subscriptions: [],
|
||||
override: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -125,13 +129,19 @@ export default {
|
||||
});
|
||||
},
|
||||
handleImport() {
|
||||
this.fetchJson(this.apiUrl() + "/import", null, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: this.getAuthToken(),
|
||||
this.fetchJson(
|
||||
this.apiUrl() + "/import",
|
||||
{
|
||||
override: this.override,
|
||||
},
|
||||
body: JSON.stringify(this.subscriptions),
|
||||
}).then(json => {
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
Authorization: this.getAuthToken(),
|
||||
},
|
||||
body: JSON.stringify(this.subscriptions),
|
||||
},
|
||||
).then(json => {
|
||||
if (json.message === "ok") window.location = "/feed";
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user