Skip to content

Commit

Permalink
Merge branch 'main' into oltp
Browse files Browse the repository at this point in the history
  • Loading branch information
llun committed Feb 23, 2025
2 parents 5d345cc + 749946b commit 01a78b1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
18 changes: 15 additions & 3 deletions app/api/nodeinfo/route.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
export const GET = async () => {
return Response.json({
import { NextRequest } from 'next/server'

import { VERSION } from '@/lib/constants'
import { HttpMethod } from '@/lib/utils/getCORSHeaders'
import { apiResponse, defaultOptions } from '@/lib/utils/response'

export const dynamic = 'force-dynamic'

const CORS_HEADERS = [HttpMethod.enum.OPTIONS, HttpMethod.enum.GET]

export const OPTIONS = defaultOptions(CORS_HEADERS)

export const GET = async (req: NextRequest) => {
return apiResponse(req, CORS_HEADERS, {
version: '2.0',
software: {
name: 'llun.activities',
version: '0.1'
version: VERSION
},
protocols: ['activitypub'],
usage: {
Expand Down
5 changes: 3 additions & 2 deletions lib/utils/trace.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { trace } from '@opentelemetry/api'

import { logger } from './logger'
import { VERSION } from '@/lib/constants'
import { logger } from '@/lib/utils/logger'

export const TRACE_APPLICATION_SCOPE = 'activities.next'
export const TRACE_APPLICATION_VERSION = '0.1.7'
export const TRACE_APPLICATION_VERSION = VERSION

export interface Data {
[key: string]: string | boolean | number | undefined
Expand Down

0 comments on commit 01a78b1

Please sign in to comment.