use custom request

This commit is contained in:
SrGooglo 2023-05-16 19:31:42 +00:00
parent 2f50a48260
commit 0e482d8d71

View File

@ -33,7 +33,10 @@ export default (props) => {
const [wallpaperData, setWallpaperData] = React.useState(null)
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)
return []
})