summaryrefslogtreecommitdiff
path: root/src2/pages/api/token.js
blob: ec048158c1d33136d042a8601b23adb4b23f4a23 (plain)
1
2
3
4
5
6
7
8
9
10
import axios from "axios";

export default async function handler(req, res) {
  try {
    let result = await axios.get(process.env.ODOO_HOST + '/api/token');
    res.status(200).json(result.data.result);
  } catch (error) {
    res.status(400).json({ error: error.message });
  }
}