Add base project files including environment example, license, README, .gitignore, error classes, ESLint config, database modules, texture assets, repositories, routes, schemas, services, and server entry point. This establishes the foundational structure for a Yggdrasil-compatible REST API with modular error handling, database setup, and route organization.
12 lines
562 B
JavaScript
12 lines
562 B
JavaScript
const express = require("express")
|
|
const router = express.Router()
|
|
const userService = require("../../../../services/userService")
|
|
const authService = require("../../../../services/authService")
|
|
|
|
router.get("/", async (req, res) => {
|
|
const player = await authService.verifyAccessToken({ accessToken: req.headers.authorization.replace("Bearer ", "") })
|
|
const nameChangeInformation = await userService.getPlayerNameChangeStatus(player.user.uuid)
|
|
return res.status(nameChangeInformation.code).json(nameChangeInformation.data)
|
|
})
|
|
|
|
module.exports = router |