Skip to content

Commit

Permalink
refactor: update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
emrahcom committed Jan 9, 2024
1 parent 18b18ad commit 6c8ff13
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/jitok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// jitok.ts
// ----------------------------------------------------------------------------
import { serve } from "https://deno.land/[email protected]/http/server.ts";
import { Status } from "https://deno.land/[email protected]/http/status.ts";
import { STATUS_CODE } from "https://deno.land/[email protected]/http/status.ts";
import { Algorithm } from "https://deno.land/x/[email protected]/algorithm.ts";
import {
create,
Expand Down Expand Up @@ -37,7 +37,7 @@ class BadRequest extends Error {
// ----------------------------------------------------------------------------
function ok(body: string): Response {
return new Response(body, {
status: Status.OK,
status: STATUS_CODE.OK,
headers: {
"Access-Control-Allow-Origin": "*",
},
Expand All @@ -47,21 +47,21 @@ function ok(body: string): Response {
// ----------------------------------------------------------------------------
function badRequest(): Response {
return new Response("BadRequest", {
status: Status.BadRequest,
status: STATUS_CODE.BadRequest,
});
}

// ----------------------------------------------------------------------------
function forbidden(): Response {
return new Response("Forbidden", {
status: Status.Forbidden,
status: STATUS_CODE.Forbidden,
});
}

// ----------------------------------------------------------------------------
function notImplemented(): Response {
return new Response("NotImplemented", {
status: Status.NotImplemented,
status: STATUS_CODE.NotImplemented,
});
}

Expand Down

0 comments on commit 6c8ff13

Please sign in to comment.