@kumori/aurora-backend-handler 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ import {
7
7
  makeGlobalWebSocketRequest,
8
8
  } from "../websocket-manager";
9
9
  import { Link, Notification, Service } from "@kumori/aurora-interfaces";
10
+ import { Revision } from "@kumori/aurora-interfaces/interfaces/revision-interface";
10
11
  let pendingLinks = new Map<string, Link[]>();
11
12
  /**
12
13
  * Function to deploy a service
@@ -787,10 +788,10 @@ export const changeRevision = async (data: Service, token: string) => {
787
788
  eventHelper.notification.publish.creation(notification);
788
789
  }
789
790
  };
790
- function getLatestRevision(revisions: string[]): number | null {
791
+ function getLatestRevision(revisions: Revision[]): number | null {
791
792
  if (!revisions || revisions.length === 0) {
792
793
  return null;
793
794
  }
794
795
 
795
- return Math.max(...revisions.map(Number));
796
+ return Math.max(...revisions.map((revision) => Number(revision.id)));
796
797
  }