From 6f61d46bd529a98257980ce8af92db8dfe42b833 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 18 Nov 2022 17:36:27 +0700 Subject: User activation feature --- src/pages/api/activation.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/pages/api/activation.js (limited to 'src/pages/api/activation.js') diff --git a/src/pages/api/activation.js b/src/pages/api/activation.js new file mode 100644 index 00000000..67ec1c9e --- /dev/null +++ b/src/pages/api/activation.js @@ -0,0 +1,16 @@ +import apiOdoo from "../../helpers/apiOdoo"; + +export default async function handler(req, res) { + try { + const { token } = req.body; + let result = await apiOdoo( + 'POST', + '/api/v1/user/activation', + {token} + ); + res.status(200).json(result); + } catch (error) { + console.log(error); + res.status(400).json({ error: error.message }); + } +} \ No newline at end of file -- cgit v1.2.3