-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
154 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
from database import ( | ||
ImageModel, | ||
DatasetModel, | ||
CategoryModel, | ||
AnnotationModel | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,55 @@ | ||
import axios from "axios"; | ||
|
||
const baseURL = "/api/dataset/"; | ||
const baseURL = "/api/dataset"; | ||
|
||
export default { | ||
allData(params) { | ||
return axios.get(baseURL + "data", { | ||
return axios.get(`${baseURL}/data`, { | ||
params: { | ||
...params | ||
} | ||
}); | ||
}, | ||
getData(id, params) { | ||
return axios.get(baseURL + `${id}/data`, { | ||
return axios.get(`${baseURL}/${id}/data`, { | ||
params: { | ||
...params | ||
} | ||
}); | ||
}, | ||
create(name, categories) { | ||
return axios.post(baseURL + `?name=${name}`, { | ||
return axios.post(`${baseURL}/?name=${name}`, { | ||
categories: categories | ||
}); | ||
}, | ||
generate(id, body) { | ||
return axios.post(baseURL + `${id}/generate`, { | ||
return axios.post(`${baseURL}/${id}/generate`, { | ||
...body | ||
}); | ||
}, | ||
scan(id) { | ||
return axios.get(baseURL + `${id}/scan`); | ||
return axios.get(`${baseURL}/${id}/scan`); | ||
}, | ||
exportingCOCO(id) { | ||
return axios.get(baseURL + `${id}/export`); | ||
return axios.get(`${baseURL}/${id}/export`); | ||
}, | ||
getCoco(id) { | ||
return axios.get(baseURL + `${id}/coco`); | ||
return axios.get(`${baseURL}/${id}/coco`); | ||
}, | ||
uploadCoco(id, file) { | ||
let form = new FormData(); | ||
form.append("coco", file); | ||
|
||
return axios.post(baseURL + `${id}/coco`, form, { | ||
return axios.post(`${baseURL}/${id}/coco`, form, { | ||
headers: { | ||
"Content-Type": "multipart/form-data" | ||
} | ||
}); | ||
}, | ||
export(id, format) { | ||
return axios.get(baseURL + `${id}/${format}`); | ||
return axios.get(`${baseURL}/${id}/${format}`); | ||
}, | ||
getUsers(id) { | ||
return axios.get(`${baseURL}/${id}/users`); | ||
} | ||
}; |
Oops, something went wrong.