forked from Ivasoft/geovisio-website
fix type check
This commit is contained in:
@@ -27,7 +27,7 @@ import {
|
||||
|
||||
let pictures = ref<any>()
|
||||
|
||||
function toto($event: Event) {
|
||||
function toto($event: any) {
|
||||
pictures.value = [...$event.target.files]
|
||||
.filter((p) => p.type == 'image/jpeg')
|
||||
.sort((a, b) => a.name.localeCompare(b.name))
|
||||
@@ -43,7 +43,7 @@ async function tata() {
|
||||
return await createAPictureToASequence(id, body)
|
||||
}
|
||||
try {
|
||||
pictures.value.map(async (el, i) => {
|
||||
pictures.value.map(async (el: any, i: any) => {
|
||||
const body = new FormData()
|
||||
body.append('position', i + 1)
|
||||
body.append('picture', el)
|
||||
@@ -55,10 +55,14 @@ async function tata() {
|
||||
}
|
||||
}
|
||||
|
||||
function addPictures($event: Event) {
|
||||
function addPictures($event: any) {
|
||||
pictures.value = $event.target.files
|
||||
}
|
||||
function uploadNextPicture(collectionId: string, pictures, currentPictureId) {
|
||||
function uploadNextPicture(
|
||||
collectionId: string,
|
||||
pictures: any,
|
||||
currentPictureId: any
|
||||
): any {
|
||||
const picFile = pictures[currentPictureId]
|
||||
const pos = currentPictureId + 1
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import axios from 'axios'
|
||||
|
||||
function createASequence(title: string): Promise<unknown> {
|
||||
function createASequence(title: string): Promise<any> {
|
||||
return axios.post('api/collections', { title: title })
|
||||
}
|
||||
|
||||
function createAPictureToASequence(id: string, body: any): Promise<unknown> {
|
||||
function createAPictureToASequence(id: string, body: any): Promise<any> {
|
||||
console.log(id, body)
|
||||
return axios.post(`api/collections/${id}/items`, body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user