Remove all database dependencies and simplify application
BREAKING CHANGE: Remove all data analysis features This commit removes all database-dependent functionality and simplifies the application to focus on authentication and user management only. Changes: - Remove all /api/data and /api/metadata server endpoints - Remove Supabase configuration from nuxt.config.ts and .env.example - Remove @supabase/supabase-js dependency from package.json - Delete data analysis pages: explorer, metadatos, rawExplorer, panorama, comparativa-cosechas, informe-ingresos - Simplify sidebar navigation to show only "Inicio" - Update home page to focus on authentication and profile management - Remove "Supabase" and "Solo lectura" badges from navbar - Keep only auth-related API endpoints: /api/auth/status and /api/auth/check-group The application now serves as an authentication-protected portal with: - Authentik SSO integration - User profile management - Settings and notifications pages (coming soon) - No database or data analysis features
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
import { parseQuerySegment } from '../../../services/query-parser'
|
||||
import { fetchTableData, fetchTableRecord } from '../../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const table = event.context.params?.table
|
||||
const segmentParam = event.context.params?.segment
|
||||
|
||||
if (!table || !segmentParam) {
|
||||
throw createError({ statusCode: 400, statusMessage: 'Tabla o parámetro no especificados' })
|
||||
}
|
||||
|
||||
const values = Array.isArray(segmentParam) ? segmentParam : [segmentParam]
|
||||
const target = values[0]
|
||||
|
||||
const parsedQuery = parseQuerySegment(target)
|
||||
|
||||
if (parsedQuery) {
|
||||
return await fetchTableData(table, { parsedQuery })
|
||||
}
|
||||
|
||||
return await fetchTableRecord(table, target)
|
||||
})
|
||||
@@ -1,30 +0,0 @@
|
||||
import { parseQuerySegment } from '../../../services/query-parser'
|
||||
import { fetchTableData } from '../../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const table = event.context.params?.table
|
||||
|
||||
if (!table) {
|
||||
throw createError({ statusCode: 400, statusMessage: 'Tabla no especificada' })
|
||||
}
|
||||
|
||||
const query = getQuery(event)
|
||||
const limitValue = Number.parseInt((query.limit as string) ?? '', 10)
|
||||
const limit = Number.isFinite(limitValue) ? Math.min(Math.max(limitValue, 1), 500) : undefined
|
||||
|
||||
const offsetValue = Number.parseInt((query.offset as string) ?? '', 10)
|
||||
const offset = Number.isFinite(offsetValue) ? Math.max(offsetValue, 0) : undefined
|
||||
|
||||
const parsedQuery = parseQuerySegment(query.query as string | undefined)
|
||||
|
||||
return await fetchTableData(table, {
|
||||
parsedQuery,
|
||||
limit,
|
||||
offset,
|
||||
filters: {
|
||||
id: (query.id as string) || undefined,
|
||||
createdFrom: (query.created_from as string) || undefined,
|
||||
createdTo: (query.created_to as string) || undefined
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -1,9 +0,0 @@
|
||||
import { fetchAllData } from '../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const query = getQuery(event)
|
||||
const requestedLimit = Number.parseInt((query.limit as string) ?? '', 10)
|
||||
const limit = Number.isFinite(requestedLimit) ? Math.min(Math.max(requestedLimit, 1), 100) : 25
|
||||
|
||||
return await fetchAllData(limit)
|
||||
})
|
||||
@@ -1,12 +0,0 @@
|
||||
import { fetchTableRecordMetadata } from '../../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const table = event.context.params?.table
|
||||
const id = event.context.params?.id
|
||||
|
||||
if (!table || !id) {
|
||||
throw createError({ statusCode: 400, statusMessage: 'Tabla o id no especificados' })
|
||||
}
|
||||
|
||||
return await fetchTableRecordMetadata(table, id)
|
||||
})
|
||||
@@ -1,15 +0,0 @@
|
||||
import { parseQuerySegment } from '../../../services/query-parser'
|
||||
import { fetchTableMetadata } from '../../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const table = event.context.params?.table
|
||||
|
||||
if (!table) {
|
||||
throw createError({ statusCode: 400, statusMessage: 'Tabla no especificada' })
|
||||
}
|
||||
|
||||
const query = getQuery(event)
|
||||
const parsedQuery = parseQuerySegment(query.query as string | undefined)
|
||||
|
||||
return await fetchTableMetadata(table, { parsedQuery })
|
||||
})
|
||||
@@ -1,5 +0,0 @@
|
||||
import { fetchAllTablesMetadata } from '../../services/table-service'
|
||||
|
||||
export default defineEventHandler(async () => {
|
||||
return await fetchAllTablesMetadata()
|
||||
})
|
||||
Reference in New Issue
Block a user