diff --git a/src/repositories/browse.repository.ts b/src/repositories/browse.repository.ts index 0ba27fa..cfa2937 100644 --- a/src/repositories/browse.repository.ts +++ b/src/repositories/browse.repository.ts @@ -33,40 +33,11 @@ export default class Browse { result: { directories: result.recordsets[1][0] || [], documents: result.recordsets[2][0] || [], - breadcrumbs: result.recordsets[3][0] || [] + breadcrumbs: result.recordsets[3] || [] } } } else { throw new Error(error) } } - - /** - * Get detail for ui page - * @deprecated No longer in use, use documentscontroller instead - * @param {number} id - * @param {number} user_id - * @returns {Promise} - */ - async getBreadcrumbs(id: number, user_id?: string) { - const r = new sql.Request(this._pool) - r.input('id', sql.Int, id) - r.input('user_id', sql.Int, user_id) - this._logger.debug({ sqlParam: { id, user_id }, sqlSchema: this.schema, sqlProc: 'GetUiBreadcrumbs' }, 'running procedure') - - const result = await r.execute('GetUiBreadcrumbs') - this._logger.debug({ result }, 'procedure result') - - const { error, verified } = result.recordset[0] - - if (!error) { - return { - error, - verified, - breadcrumbs: result.recordsets[1] || [] - } - } else { - throw new Error(error) - } - } } \ No newline at end of file diff --git a/src/repositories/document.repository.ts b/src/repositories/document.repository.ts index fc05034..6951bc3 100644 --- a/src/repositories/document.repository.ts +++ b/src/repositories/document.repository.ts @@ -54,7 +54,7 @@ export default class Document { error, verified, result: result.recordsets[1][0][0] || [], - breadcrumbs: result.recordsets[2][0] || [] + breadcrumbs: result.recordsets[2] || [] } } else { throw new Error(error) @@ -314,7 +314,7 @@ export interface IDocument { attributes?: number[] } -export interface IPostedDocument{ +export interface IPostedDocument { uuid: string directory_id: number name: string