Skip to content

Commit

Permalink
refactor: replace deprecated fields (#619)
Browse files Browse the repository at this point in the history
* refactor: replace deprecated fields

* refactor: finish wip
  • Loading branch information
secondl1ght authored Dec 23, 2024
1 parent 0a9ae34 commit 828e267
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 29 deletions.
2 changes: 0 additions & 2 deletions schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,8 @@ input UpdateRoutingFeesParams {
}

type UserBackupInfo {
available_size: String!
last_update: String
last_update_size: String
remaining_size: String!
total_size_saved: String!
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/client/src/graphql/queries/getAmbossUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ export const GET_AMBOSS_USER = gql`
last_update
last_update_size
total_size_saved
available_size
remaining_size
}
ghost {
username
Expand Down
2 changes: 0 additions & 2 deletions src/client/src/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,8 @@ export type UpdateRoutingFeesParams = {

export type UserBackupInfo = {
__typename?: 'UserBackupInfo';
available_size: Scalars['String']['output'];
last_update?: Maybe<Scalars['String']['output']>;
last_update_size?: Maybe<Scalars['String']['output']>;
remaining_size: Scalars['String']['output'];
total_size_saved: Scalars['String']['output'];
};

Expand Down
12 changes: 1 addition & 11 deletions src/client/src/views/amboss/Backups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,10 @@ export const AmbossBackupsView = () => {
if (!user) return null;

const {
backups: {
remaining_size,
total_size_saved,
last_update,
last_update_size,
},
backups: { total_size_saved, last_update, last_update_size },
} = user;

const total = Number(total_size_saved) / 1e6;
const remaining = Number(remaining_size) / 1e6;

return (
<>
Expand All @@ -74,10 +68,6 @@ export const AmbossBackupsView = () => {
'Total Size Saved',
`${numeral(total).format('0.[0000]')} MB`
)}
{renderLine(
'Remaining Size Available',
`${numeral(remaining).format('0.[0000]')} MB`
)}
<Separation />
</>
);
Expand Down
2 changes: 0 additions & 2 deletions src/server/modules/api/amboss/amboss.gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ export const getUserQuery = gql`
upgradable
}
backups {
available_size
last_update
last_update_size
remaining_size
total_size_saved
}
ghost {
Expand Down
6 changes: 0 additions & 6 deletions src/server/modules/api/amboss/amboss.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ export class UserBackupInfo {

@Field()
total_size_saved: string;

@Field()
available_size: string;

@Field()
remaining_size: string;
}

@ObjectType()
Expand Down

0 comments on commit 828e267

Please sign in to comment.