mirror of
https://github.com/Ravinou/borgwarehouse
synced 2024-06-17 13:15:22 +02:00
17 lines
445 B
JavaScript
17 lines
445 B
JavaScript
import packageInfo from '../../../package.json';
|
|
|
|
export default async function handler(req, res) {
|
|
if (req.method === 'GET') {
|
|
try {
|
|
res.status(200).json({ version: packageInfo.version });
|
|
return;
|
|
} catch (error) {
|
|
res.status(500).json({
|
|
status: 500,
|
|
message: 'API error, contact the administrator !',
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
}
|