Skip to content

Commit

Permalink
chore: logging
Browse files Browse the repository at this point in the history
  • Loading branch information
rayriffy committed Mar 7, 2024
1 parent 2c67fc0 commit dee4e2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/api/svg/[theme]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getMusicKitDeveloperToken } from '$core/services/getMusicKitDeveloperTo
import { getRecentlyPlayedTrack } from '$modules/music/services/getRecentlyPlayedTrack'
import { getAlbumCover } from '$modules/music/services/getAlbumCover'
import { optimizeSVG } from '$core/services/optimizeSVG'
import { getClientAddress } from '$core/services/getClientAddress'

export const GET = async (req: Request, context) => {
const params = new URL(req.url).searchParams
Expand Down Expand Up @@ -117,6 +118,7 @@ export const GET = async (req: Request, context) => {
}),
collections.logs.insertOne({
uid,
clientAddress: getClientAddress(),
loggedAt
})
])
Expand Down
1 change: 1 addition & 0 deletions src/core/@types/mongo/Log.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export interface Log {
uid: string
clientAddress: string | null
loggedAt: Date
}

0 comments on commit dee4e2b

Please sign in to comment.