some fixes for uploading workout
Gitea Actions Demo / build_and_push (push) Successful in 5m13s
Details
Gitea Actions Demo / build_and_push (push) Successful in 5m13s
Details
This commit is contained in:
parent
5767356d73
commit
c0492b1977
|
|
@ -15,6 +15,7 @@ app.use(router);
|
||||||
app.use(i18n);
|
app.use(i18n);
|
||||||
app.use(createVuestic({ config: vuesticGlobalConfig }));
|
app.use(createVuestic({ config: vuesticGlobalConfig }));
|
||||||
app.provide('HOST', "https://cycle-rider.ru");
|
app.provide('HOST', "https://cycle-rider.ru");
|
||||||
|
//app.provide('HOST', "http://localhost:8000");
|
||||||
if (import.meta.env.VITE_APP_GTM_ENABLED) {
|
if (import.meta.env.VITE_APP_GTM_ENABLED) {
|
||||||
app.use(
|
app.use(
|
||||||
createGtm({
|
createGtm({
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<h1 class="page-title">Загрузить тренировку</h1>
|
<h1 class="page-title">Загрузить тренировку</h1>
|
||||||
<VaFileUpload
|
<VaFileUpload
|
||||||
v-model="file"
|
v-model="file"
|
||||||
file-types="image/*"
|
file-types="gpx,fit"
|
||||||
type="single"
|
type="single"
|
||||||
v-on:update:model-value="onFileChanged"
|
v-on:update:model-value="onFileChanged"
|
||||||
color="#F4F6F8"
|
color="#F4F6F8"
|
||||||
|
|
@ -39,7 +39,7 @@ function onFileChanged() {
|
||||||
}
|
}
|
||||||
}).then(function (response) {
|
}).then(function (response) {
|
||||||
axios
|
axios
|
||||||
.patch(`${HOST}/api/v0/workouts`, {
|
.post(`${HOST}/api/v0/workouts`, {
|
||||||
"attachment_id": response.data.id,
|
"attachment_id": response.data.id,
|
||||||
"name": "Новая тренировка",
|
"name": "Новая тренировка",
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -57,7 +57,6 @@ function onFileChanged() {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log("2", error);
|
|
||||||
init({
|
init({
|
||||||
message: "Что-то пошло не так.",
|
message: "Что-то пошло не так.",
|
||||||
color: "error",
|
color: "error",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue