Skip to content

Commit

Permalink
fix: instances
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcastrodev committed Oct 1, 2023
1 parent be9d9a8 commit f7177c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Services/GithubAzureService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
ServiceError,
} from "../Types/index.ts";
import { CONSTANTS } from "../utils.ts";
import { Logger } from "../Helpers/Logger.ts";

const authentication = Deno.env.get("X_API_KEY");

Expand Down Expand Up @@ -79,7 +80,7 @@ export class GithubAzureService extends GithubRepository {
];

if (status.includes("rejected")) {
console.error(`Can not find a user with username:' ${username}'`);
Logger.error(`Can not find a user with username:' ${username}'`);
return new ServiceError("not found", EServiceKindError.NOT_FOUND);
}

Expand All @@ -100,7 +101,6 @@ export class GithubAzureService extends GithubRepository {
TOKENS.length,
CONSTANTS.DEFAULT_GITHUB_RETRY_DELAY,
);
console.log("HIT");
try {
const response = await retry.fetch<Promise<T>>(async () => {
return await soxa.post("", {}, {
Expand All @@ -117,9 +117,9 @@ export class GithubAzureService extends GithubRepository {
} catch (error) {
// TODO: Move this to a logger instance later
if (error instanceof Error && error.cause) {
console.error(JSON.stringify(error.cause, null, 2));
Logger.error(JSON.stringify(error.cause, null, 2));
} else {
console.error(error);
Logger.error(error);
}

return new ServiceError("not found", EServiceKindError.NOT_FOUND);
Expand Down
2 changes: 1 addition & 1 deletion src/StaticRenderRegeneration/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function readCache(cacheFilePath: string): Uint8Array | null {
}

// https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest
export async function generateUUID(message: string): Promise<string> {
export async function hashString(message: string): Promise<string> {
const encoder = new TextEncoder();
const data = encoder.encode(message);
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
Expand Down

0 comments on commit f7177c1

Please sign in to comment.