DatabasesContainer: add more fields to table
This commit is contained in:
parent
ae6b8cba19
commit
231b8b40d6
2 changed files with 20 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue