Skip to content

Commit

Permalink
Remove/redis cache (#329)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
Luisfp0 and github-actions[bot] authored Oct 9, 2024
1 parent 8b67e78 commit 8a49e5b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
8 changes: 4 additions & 4 deletions apps/web/app/(roles)/vagas/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ async function getJobs() {
try {
const client = await getRedisClient()
const jobsFromCache = await client.get('web_jobs')
if (jobsFromCache) {
await client.quit()
return JSON.parse(jobsFromCache)
}
// if (jobsFromCache) {
// await client.quit()
// return JSON.parse(jobsFromCache)
// }

const { data: jobs } = await fetchJobs([])

Expand Down
21 changes: 21 additions & 0 deletions apps/web/app/api/version/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { NextResponse } from 'next/server'
import { readFileSync } from 'fs'
import { join } from 'path'

export async function GET() {
try {
const packageJson = JSON.parse(
readFileSync(join(process.cwd(), 'package.json'), 'utf8')
)

const version = packageJson.version

return NextResponse.json({ version })
} catch (error) {
console.error('Erro ao ler a versão:', error)
return NextResponse.json(
{ error: 'Erro ao obter a versão' },
{ status: 500 }
)
}
}
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "1.0.39",
"version": "1.0.40",
"private": true,
"scripts": {
"dev": "development=true next dev",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10136,7 +10136,7 @@ web-streams-polyfill@^3.0.3:
integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==

"web@file:/home/runner/work/trampar-de-casa/trampar-de-casa/apps/web":
version "1.0.39"
version "1.0.40"
resolved "file:apps/web"
dependencies:
"@headlessui/react" "^1.7.15"
Expand Down

0 comments on commit 8a49e5b

Please sign in to comment.