forked from github/plane
Merge pull request #2312 from makeplane/stage-release
release: stage release to production
This commit is contained in:
commit
f751619759
@ -4,6 +4,7 @@ import type { NextApiRequest, NextApiResponse } from "next";
|
|||||||
const unsplashKey = process.env.UNSPLASH_ACCESS_KEY;
|
const unsplashKey = process.env.UNSPLASH_ACCESS_KEY;
|
||||||
|
|
||||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||||
|
try {
|
||||||
const { query, page, per_page = 20 } = req.query;
|
const { query, page, per_page = 20 } = req.query;
|
||||||
|
|
||||||
const url = query
|
const url = query
|
||||||
@ -18,5 +19,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
res.status(200).json(response);
|
res.status(200).json(response?.data);
|
||||||
|
} catch (error) {
|
||||||
|
res.status(500).json({ message: "Failed to fetch unsplash", error });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user