Refactor .gitignore to streamline ignored files and enhance clarity. Update CLAUDE.md to improve unit test instructions and add coverage reporting details. Revise README.md for better project overview and deployment instructions. Refactor ChannelEndpoints and StreamingEndpoints to utilize SegmentFiles for file resolution, improving code maintainability. Remove unused JunctionHandlers and update DependencyInjection for cleaner service registration. Enhance media processing services for better job handling and error management. Update frontend API types for consistency and clarity.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { HttpError } from '@/shared/api/client'
|
||||
import { qk } from '@/shared/api/query-keys'
|
||||
import { useApiError } from '@/shared/lib/use-api-error'
|
||||
import { Badge } from '@/shared/ui/badge'
|
||||
import { Button } from '@/shared/ui/button'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/shared/ui/card'
|
||||
@@ -40,9 +41,9 @@ export function UsersPanel() {
|
||||
const [newRoleId, setNewRoleId] = useState('')
|
||||
const [resetTarget, setResetTarget] = useState<UserSummaryDto | null>(null)
|
||||
|
||||
const { data: roles } = useQuery({ queryKey: ['admin', 'roles'], queryFn: listRoles })
|
||||
const { data: roles } = useQuery({ queryKey: qk.roles.all, queryFn: listRoles })
|
||||
const { data, isLoading } = useQuery({
|
||||
queryKey: ['admin', 'users', page, search, roleId, sort.key, sort.desc],
|
||||
queryKey: qk.users.list(page, search, roleId, sort.key, sort.desc),
|
||||
queryFn: () =>
|
||||
listUsers({
|
||||
page,
|
||||
@@ -54,9 +55,9 @@ export function UsersPanel() {
|
||||
}),
|
||||
})
|
||||
|
||||
const invalidate = () => queryClient.invalidateQueries({ queryKey: ['admin', 'users'] })
|
||||
const invalidate = () => queryClient.invalidateQueries({ queryKey: qk.users.all })
|
||||
|
||||
const onError = (error: unknown) => toast.error(error instanceof HttpError ? error.detail : t('common.error'))
|
||||
const onError = useApiError()
|
||||
|
||||
const blockMutation = useMutation({ mutationFn: blockUser, onSuccess: invalidate, onError })
|
||||
const unblockMutation = useMutation({ mutationFn: unblockUser, onSuccess: invalidate, onError })
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { apiRequest } from '@/shared/api/client'
|
||||
import type { CreatedIdResponse, PagedList, UserSummaryDto } from '@/shared/api/types'
|
||||
|
||||
export type ListUsersParams = {
|
||||
type ListUsersParams = {
|
||||
page: number
|
||||
pageSize: number
|
||||
search?: string
|
||||
|
||||
Reference in New Issue
Block a user