Skip to content

Commit

Permalink
Move PrismaClient variable to top of file
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielMajeri committed Sep 18, 2024
1 parent 069b22a commit c75199b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prisma/seed-admin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { PrismaClient, Role } from "@prisma/client";
import { createInterface as readlineCreateInterface } from "readline";
import { stdin as input, stdout as output } from "process";

const prisma = new PrismaClient();

const MICROSOFT_GRAPH_ENDPOINT = "https://graph.microsoft.com/";

async function acquireAccessToken() {
Expand Down Expand Up @@ -44,8 +46,6 @@ async function acquireAccessToken() {
return await cca.acquireTokenByClientCredential(tokenRequest);
}

const prisma = new PrismaClient();

async function main() {
const authenticationResult = await acquireAccessToken();
if (!authenticationResult) {
Expand Down

0 comments on commit c75199b

Please sign in to comment.