Skip to content

Commit

Permalink
Use Supabase client with admin rights
Browse files Browse the repository at this point in the history
  • Loading branch information
Siilwyn committed Jul 25, 2023
1 parent 464887d commit c610a02
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ SCHEMA_REGISTRY_PASSWORD=
MAPBOX_TOKEN=
SUPABASE_URL="https://pfsmhuunrlzvdbteqfku.supabase.co"
SUPABASE_KEY=""
SUPABASE_SERVICE_KEY=""
INTERNAL_SECRET="dev"
USE_MOCK_DATA_CMS=0
USE_MOCK_DATA_EXCHANGE=0
Expand Down
4 changes: 2 additions & 2 deletions src/server/api/consume-wifi-data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Kafka } from "kafkajs";
import { SchemaRegistry } from "@kafkajs/confluent-schema-registry";
import { serverSupabaseClient } from "#supabase/server";
import { serverSupabaseServiceRole } from "#supabase/server";
import type { SupabaseClient } from "@supabase/supabase-js";
import { parseMessageCisco, parseMessageAruba } from "../helpers/parse-message";

Expand Down Expand Up @@ -43,7 +43,7 @@ export default defineEventHandler(async (event) => {
return;
}

const client = serverSupabaseClient(event);
const client = serverSupabaseServiceRole(event);

consumeLastBatch({ client });

Expand Down

0 comments on commit c610a02

Please sign in to comment.