Files: Filter files can enter Discover.
This commit is contained in:
@@ -83,7 +83,13 @@ export default defineStore('allMapDataStore', {
|
||||
async getAllMapData() {
|
||||
let logId = this.logId;
|
||||
let tempFilterId = this.tempFilterId;
|
||||
let api = tempFilterId != null ? `/api/temp-filters/${tempFilterId}/discover` : `/api/logs/${logId}/discover`;
|
||||
let filterId = this.createFilterId
|
||||
let api = '';
|
||||
|
||||
// 先判斷暫存 再判斷 filter 最後 log
|
||||
if(tempFilterId != null) api = `/api/temp-filters/${tempFilterId}/discover`;
|
||||
else if(filterId!= null) api = `/api/filters/${filterId}/discover`;
|
||||
else api = `/api/logs/${logId}/discover`;
|
||||
|
||||
try {
|
||||
const response = await this.$axios.get(api);
|
||||
@@ -230,6 +236,7 @@ export default defineStore('allMapDataStore', {
|
||||
const response = await this.$axios.post(api, createFilterObj)
|
||||
this.createFilterId = response.data.id;
|
||||
this.tempFilterId = null;
|
||||
console.log('this.createFilterId', this.createFilterId);
|
||||
}catch(error) {
|
||||
this.httpStatus = error.request.status;
|
||||
await delay();
|
||||
|
||||
Reference in New Issue
Block a user