File tree Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Expand file tree Collapse file tree 5 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @squarecloud/api " : patch
3+ ---
4+
5+ Update backups routes to snapshots
Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ export const Routes = {
3939 commit : ( appId : string ) => {
4040 return Route < "apps/commit" > ( `apps/${ appId } /commit` ) ;
4141 } ,
42- backups : ( appId : string ) => {
43- return Route < "apps/backups " > ( `apps/${ appId } /backups ` ) ;
42+ snapshots : ( appId : string ) => {
43+ return Route < "apps/snapshots " > ( `apps/${ appId } /snapshots ` ) ;
4444 } ,
45- generateBackup : ( appId : string ) => {
46- return Route < "apps/generate-backup " > ( `apps/${ appId } /backups ` ) ;
45+ generateSnapshot : ( appId : string ) => {
46+ return Route < "apps/generate-snapshot " > ( `apps/${ appId } /snapshots ` ) ;
4747 } ,
4848 start : ( appId : string ) => {
4949 return Route < "apps/start" > ( `apps/${ appId } /start` ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export class BackupsModule {
1212 */
1313 async list ( ) : Promise < Backup [ ] > {
1414 const data = await this . application . client . api . request (
15- Routes . apps . backups ( this . application . id ) ,
15+ Routes . apps . snapshots ( this . application . id ) ,
1616 ) ;
1717
1818 const backups = data . response . map (
@@ -36,7 +36,7 @@ export class BackupsModule {
3636 */
3737 async create ( ) : Promise < RESTPostAPIApplicationBackupResult > {
3838 const data = await this . application . client . api . request (
39- Routes . apps . generateBackup ( this . application . id ) ,
39+ Routes . apps . generateSnapshot ( this . application . id ) ,
4040 { method : "POST" } ,
4141 ) ;
4242
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export class Backup {
3939 this . modifiedAt = new Date ( modified ) ;
4040 this . modifiedTimestamp = this . modifiedAt . getTime ( ) ;
4141 this . key = key ;
42- this . url = `https://backups .squarecloud.app/${ userId } _ ${ name } .zip?${ key } ` ;
42+ this . url = `https://snapshots .squarecloud.app/applications/ ${ userId } / ${ name } .zip?${ key } ` ;
4343 }
4444
4545 /**
Original file line number Diff line number Diff line change @@ -51,10 +51,10 @@ export interface APIEndpoints {
5151 "apps/logs" : {
5252 response : APIApplicationLogs ;
5353 } ;
54- "apps/backups " : {
54+ "apps/snapshots " : {
5555 response : APIApplicationBackup [ ] ;
5656 } ;
57- "apps/generate-backup " : {
57+ "apps/generate-snapshot " : {
5858 method : "POST" ;
5959 response : RESTPostAPIApplicationBackupResult ;
6060 } ;
You can’t perform that action at this time.
0 commit comments