Refactor ClusterKeyAuthorization to use class reference for cluster key retrieval

This commit is contained in:
Simon Larsen
2024-11-20 15:14:34 +00:00
parent b49e40780a
commit c94ac75a6f
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
# Description: Copilot will run this script before we commit the changes to your repository.
# Description: Copilot will run this script before we commit the changes to your repository.

View File

@@ -11,7 +11,7 @@ import BadDataException from "Common/Types/Exception/BadDataException";
export default class ClusterKeyAuthorization {
public static getClusterKeyHeaders(): Dictionary<string> {
return {
clusterkey: this.getClusterKey(),
clusterkey: ClusterKeyAuthorization.getClusterKey(),
};
}
@@ -44,7 +44,7 @@ export default class ClusterKeyAuthorization {
}
const isAuthorized: boolean =
clusterKey.toString() === this.getClusterKey();
clusterKey.toString() === ClusterKeyAuthorization.getClusterKey();
if (!isAuthorized) {
return Response.sendErrorResponse(