mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-12 12:04:16 +00:00
use custom request
This commit is contained in:
parent
2f50a48260
commit
0e482d8d71
@ -33,7 +33,10 @@ export default (props) => {
|
|||||||
const [wallpaperData, setWallpaperData] = React.useState(null)
|
const [wallpaperData, setWallpaperData] = React.useState(null)
|
||||||
|
|
||||||
const setRandomWallpaper = async () => {
|
const setRandomWallpaper = async () => {
|
||||||
const featuredWallpapers = await app.cores.api.request("get", "featuredWallpapers").catch((err) => {
|
const { data: featuredWallpapers } = await app.cores.api.customRequest({
|
||||||
|
method: "GET",
|
||||||
|
url: "/featured_wallpapers"
|
||||||
|
}).catch((err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
return []
|
return []
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user