fix: Correct GraphQL query to use instead of

This commit is contained in:
Eric F
2026-06-17 13:14:31 -04:00
parent b3c1523388
commit 5b7d61e11a
2 changed files with 19 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
// SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
//
// SPDX-License-Identifier: Apache-2.0
'use server';
import { cookies } from 'next/headers';
export async function setStationCookie(stationId: string, stationData: any) {
const cookieStore = await cookies();
cookieStore.set('station-data', JSON.stringify(stationData || null), {
httpOnly: false,
secure: false,
sameSite: 'lax',
maxAge: 60,
path: `/charging-stations/${stationId}`,
});
}

View File

@@ -193,8 +193,8 @@ export const CHARGING_STATIONS_STATUS_COUNT_QUERY = gql`
`;
export const CHARGING_STATIONS_GET_QUERY = gql`
query GetChargingStationById($where: ChargingStations_bool_exp!) {
ChargingStations(where: $where, limit: 1) {
query GetChargingStationById($id: String!) {
ChargingStations(where: {id: {_eq: $id}}, limit: 1) {
id
tenantId
ocppConnectionName