mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
makes /track/*/refresh-cache
endpoint auth only
This commit is contained in:
parent
9302365cb6
commit
154d977ebd
@ -1,8 +1,12 @@
|
||||
import { Track } from "@shared-classes/DbModels"
|
||||
import { NotFoundError } from "@shared-classes/Errors"
|
||||
import { NotFoundError, AuthorizationError } from "@shared-classes/Errors"
|
||||
import getEnhancedLyricsFromTrack from "@services/getEnhancedLyricsFromTrack"
|
||||
|
||||
export default async (req, res) => {
|
||||
if (!req.session) {
|
||||
return new AuthorizationError(req, res)
|
||||
}
|
||||
|
||||
const { track_id } = req.params
|
||||
|
||||
let track = await Track.findOne({
|
||||
|
Loading…
x
Reference in New Issue
Block a user