Add full project files

This commit is contained in:
root
2026-07-04 19:24:56 +03:30
parent d54f5441a3
commit b245e7b71a
835 changed files with 30149 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
const VersionModel = require('../../../models/VersionModel')
// Endpoint برای دریافت نسخه فعلی
const getVersion = async (req, res, next) => {
try {
const currentVersion = await VersionModel.findOne().sort({ _id: -1 }).exec()
if (!currentVersion) {
return res.status(200).json({ message: 'نسخه‌ای پیدا نشد' })
}
res.json(currentVersion)
} catch (error) {
res.status(500).json({ message: 'خطای سرور', error })
}
}
module.exports = { getVersion }