diff --git a/src/config.ts b/src/config.ts index abec77e..c1df10e 100644 --- a/src/config.ts +++ b/src/config.ts @@ -54,6 +54,3 @@ export const APP_VERSION = '1.0.0'; /** Nombre de la BD SQLite local. */ export const DB_NAME = 'avante.db'; - -/** Ability que el backend exige al token (ver brief §2). */ -export const TOKEN_ABILITY = 'mobile-sync'; diff --git a/src/db/repositories.ts b/src/db/repositories.ts index cc271b2..7000afb 100644 --- a/src/db/repositories.ts +++ b/src/db/repositories.ts @@ -44,8 +44,6 @@ export async function setMeta(key: string, value: string): Promise { } export const getCursor = (projectId: number) => getMeta(CURSOR_PREFIX + projectId); -export const setCursor = (projectId: number, serverTime: string) => - setMeta(CURSOR_PREFIX + projectId, serverTime); export const getActiveProjectId = async (): Promise => { const v = await getMeta(ACTIVE_PROJECT_KEY); @@ -301,14 +299,6 @@ export async function saveProjectList(projects: Project[]): Promise { }); } -export async function getPhases(projectId: number): Promise { - const db = await getDb(); - return db.getAllAsync( - 'SELECT * FROM phases WHERE project_id = ? ORDER BY "order", id', - projectId, - ); -} - export async function getIssues(projectId: number): Promise { const db = await getDb(); return db.getAllAsync( @@ -322,14 +312,6 @@ export async function getIssue(id: number): Promise { return db.getFirstAsync('SELECT * FROM issues WHERE id = ?', id); } -export async function getLayers(projectId: number): Promise { - const db = await getDb(); - return db.getAllAsync( - 'SELECT * FROM layers WHERE project_id = ? ORDER BY name', - projectId, - ); -} - /** Features de un proyecto. `geometry` se devuelve como objeto ya parseado. */ export async function getFeatures(projectId: number): Promise { const db = await getDb(); @@ -413,17 +395,6 @@ export async function getFeatureTypes(): Promise { return db.getAllAsync('SELECT * FROM feature_types ORDER BY name'); } -export async function getTemplate(id: number): Promise