DatabasesContainer: add more fields to table

This commit is contained in:
Matthew Penner 2021-01-06 09:17:54 -07:00
parent ae6b8cba19
commit 231b8b40d6
2 changed files with 20 additions and 2 deletions

View file

@ -11,6 +11,8 @@ export interface Database {
maxDatabases: number;
createdAt: Date;
updatedAt: Date;
getAddress (): string;
}
export const rawDataToDatabase = ({ attributes }: FractalResponseData): Database => ({
@ -22,6 +24,8 @@ export const rawDataToDatabase = ({ attributes }: FractalResponseData): Database
maxDatabases: attributes.max_databases,
createdAt: new Date(attributes.created_at),
updatedAt: new Date(attributes.updated_at),
getAddress: () => `${attributes.host}:${attributes.port}`,
});
interface ctx {