mirror of
https://github.com/Radiquum/AniX.git
synced 2025-05-01 18:39:40 +05:00
refactor(backend-&-frontend): change bookmarks api urls to /api/bookmarks/{path} from /api/favorites/{path}
BREAKING CHANGE:
This commit is contained in:
parent
278d0ec1f2
commit
f535d09e97
6 changed files with 40 additions and 34 deletions
|
@ -11,13 +11,14 @@ export const endpoints = {
|
|||
user: {
|
||||
profile: `${API_URL}/profile`,
|
||||
auth: `${API_URL}/auth`,
|
||||
history: `${API_URL}/favorites/history`,
|
||||
bookmarks: {
|
||||
watching: `${API_URL}/favorites/watching`,
|
||||
planned: `${API_URL}/favorites/planned`,
|
||||
watched: `${API_URL}/favorites/watched`,
|
||||
delayed: `${API_URL}/favorites/delayed`,
|
||||
abandoned: `${API_URL}/favorites/abandoned`,
|
||||
list: `${API_URL}/bookmarks/list`,
|
||||
history: `${API_URL}/bookmarks/history`,
|
||||
watching: `${API_URL}/bookmarks/watching`,
|
||||
planned: `${API_URL}/bookmarks/planned`,
|
||||
watched: `${API_URL}/bookmarks/watched`,
|
||||
delayed: `${API_URL}/bookmarks/delayed`,
|
||||
abandoned: `${API_URL}/bookmarks/abandoned`,
|
||||
},
|
||||
},
|
||||
release: `${API_URL}/release`,
|
||||
|
|
|
@ -46,7 +46,7 @@ export const ReleaseInfo = (props) => {
|
|||
|
||||
useEffect(() => {
|
||||
async function _setList() {
|
||||
const url = `${endpoints.user.profile}/${props.id}/${list}/add?token=${userStore.token}`;
|
||||
const url = `${endpoints.user.bookmarks.list}/${list}/${props.id}/add?token=${userStore.token}`;
|
||||
await getData(url);
|
||||
}
|
||||
if (
|
||||
|
|
|
@ -17,7 +17,7 @@ export default function History() {
|
|||
|
||||
async function fetchData(page = 0) {
|
||||
if (userStore.token) {
|
||||
const url = `${endpoints.user.history}?page=${page}&token=${userStore.token}`;
|
||||
const url = `${endpoints.user.bookmarks.history}?page=${page}&token=${userStore.token}`;
|
||||
const data = await getData(url);
|
||||
|
||||
if (data.content.length < 25) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue