moved api from monorepo

This commit is contained in:
2024-09-12 15:48:27 -04:00
parent 734bb0a0d2
commit d575a4efc5
29 changed files with 2904 additions and 0 deletions

12
utils/getTag.js Normal file
View File

@ -0,0 +1,12 @@
import Game from '../models/Game.js'
const getTag = async (tag) => {
const fullTags = await Game.find().distinct(tag)
let tags = []
for (let i = 0; i < fullTags.length; i++) {
if (fullTags[i] !== '') tags.push(fullTags[i])
}
return tags
}
export default getTag