fix(nitro-import): permissions/user-avatar 引用路径统一改为 ~~/server/utils 别名,解决 Rollup UNRESOLVED_IMPORT
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { createError, defineEventHandler, getQuery } from 'h3'
|
||||
import { db } from '~/drizzle/db'
|
||||
import { songs, users, votes, userIdentities } from '~/drizzle/schema'
|
||||
import { CacheService } from '../../../services/cacheService'
|
||||
import { getUserAvatarUrl } from '../../../utils/user-avatar'
|
||||
import { CacheService } from '~~/server/services/cacheService'
|
||||
import { getUserAvatarUrl } from '~~/server/utils/user-avatar'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const user = event.context.user
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { createError, defineEventHandler } from 'h3'
|
||||
import { db } from '~/drizzle/db'
|
||||
import { CacheService } from '../../../services/cacheService'
|
||||
import { CacheService } from '~~/server/services/cacheService'
|
||||
import { songs, users, votes, userIdentities } from '~/drizzle/schema'
|
||||
import { count, eq, gte, inArray } from 'drizzle-orm'
|
||||
import { getBeijingHour, getBeijingStartOfDay } from '~/utils/timeUtils'
|
||||
import { getUserAvatarUrl } from '../../../utils/user-avatar'
|
||||
import { getUserAvatarUrl } from '~~/server/utils/user-avatar'
|
||||
|
||||
function formatRelativeTime(date: Date | null | undefined): string {
|
||||
if (!date) return '未知'
|
||||
|
||||
Reference in New Issue
Block a user