Skip to content

Commit

Permalink
Merge pull request #193 from gruz0/refactor/use-identify-instead-of-r…
Browse files Browse the repository at this point in the history
…andom-uuid

Use Identity instead of randomUUID
  • Loading branch information
gruz0 authored Nov 27, 2024
2 parents db1afd0 + f1c1fb2 commit ebca21e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/api/concepts/[id]/route.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { randomUUID } from 'crypto'
import * as Sentry from '@sentry/nextjs'
import { NextResponse } from 'next/server'
import { App } from '@/concept/service/Service'
import { Identity } from '@/shared/Identity'

export async function POST(_: Request, { params }: { params: { id: string } }) {
Sentry.setTag('component', 'HTTP API')
Sentry.setTag('concept_id', params.id)

try {
const newIdeaId = randomUUID()
const newIdeaId = Identity.Generate().getValue()

Sentry.setTag('idea_id', newIdeaId)

Expand Down
4 changes: 2 additions & 2 deletions src/app/api/concepts/route.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { randomUUID } from 'crypto'
import * as Sentry from '@sentry/nextjs'
import { NextResponse } from 'next/server'
import { App } from '@/concept/service/Service'
import { createIdeaLimiterKey, manager } from '@/lib/rateLimiter'
import { Identity } from '@/shared/Identity'

const createIdeaLimiter = manager.getLimiter(createIdeaLimiterKey)

Expand Down Expand Up @@ -42,7 +42,7 @@ export async function POST(request: Request) {
)
}

const conceptId = randomUUID()
const conceptId = Identity.Generate().getValue()

Sentry.setTag('concept_id', conceptId)

Expand Down

0 comments on commit ebca21e

Please sign in to comment.