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

13
services/TokenService.js Normal file
View File

@@ -0,0 +1,13 @@
const jwt = require('jsonwebtoken')
exports.sign = (data) => {
return jwt.sign(data, process.env.APP_SECRET)
}
exports.verify = (token) => {
try {
jwt.verify(token, process.env.APP_SECRET)
return true
} catch (error) {
return false
}
}