From 5551b1dd08d4f9865503cc33fbdd5fa45d5c8ea7 Mon Sep 17 00:00:00 2001
From: David Sehnal <david.sehnal@gmail.com>
Date: Sun, 5 Nov 2017 17:18:30 +0100
Subject: [PATCH] dom server tweak

---
 src/apps/domain-annotation-server/mapping.ts | 3 +--
 src/apps/domain-annotation-server/schemas.ts | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/apps/domain-annotation-server/mapping.ts b/src/apps/domain-annotation-server/mapping.ts
index 42098a4ff..419e4c270 100644
--- a/src/apps/domain-annotation-server/mapping.ts
+++ b/src/apps/domain-annotation-server/mapping.ts
@@ -44,10 +44,9 @@ function writeDomain(enc: CIFEncoder<any>, domain: DomainAnnotation | undefined)
 
 function getSources(data: any): Table<S.Sources> {
     const rows: Table.Row<S.Sources>[] = [];
-    let id = 1;
     for (const name of Object.keys(S.categories)) {
         if (!data[name]) continue;
-        const row: Table.Row<S.Sources> = { id: id++, name, count: Object.keys(data[name]).length };
+        const row: Table.Row<S.Sources> = { id: name, count: Object.keys(data[name]).length };
         if (row.count > 0) rows.push(row);
     }
     return Table.ofRows(S.Sources, rows);
diff --git a/src/apps/domain-annotation-server/schemas.ts b/src/apps/domain-annotation-server/schemas.ts
index 7b76600f0..34f17d566 100644
--- a/src/apps/domain-annotation-server/schemas.ts
+++ b/src/apps/domain-annotation-server/schemas.ts
@@ -9,8 +9,7 @@ import { Column } from 'mol-base/collections/database'
 import Type = Column.Type
 
 export const Sources = {
-    id: Type.int,
-    name: Type.str,
+    id: Type.str,
     count: Type.int
 }
 export type Sources = typeof Sources
-- 
GitLab