404Notice

This commit is contained in:
Kar
2023-05-22 20:51:01 +05:30
parent 3d766bf4bf
commit 0ce8e447f4
10 changed files with 2889 additions and 2824 deletions

View File

@@ -57,25 +57,14 @@ export default {
this.file = this.page.attachments
// console.log(this.file)
this.isLoading = false
});
fetch('https://api8.siliconpin.com/items/scc22?filter[slug][_eq]=' + path[2])
.then((response) => {
if (response.ok) {
return response.json();
}
// throw new Error('Something went wrong');
})
.then(jsonPageData => {
this.page = jsonPageData.data
console.log(this.page)
this.isLoading = false
return jsonPageData.data[0].id
}
)
return this.page.id
})
.then((pageID) => {
console.log(pageID)
fetch('https://api8.siliconpin.com/items/scc22_files_1?filter[scc22_id][_in]=' + pageID)
.then(resp => resp.json())
.then(file => {
console.log(file)
let attIDs = ''
let t = 0
file.data.forEach(ids => {
@@ -84,6 +73,7 @@ export default {
t++
});
if(t>0) this.fileAttached=true
return attIDs
})
.then((attIDs) => {
@@ -91,6 +81,7 @@ export default {
.then(resp => resp.json())
.then(file => {
this.files = file.data
})
})
})