fix: Correct GraphQL query to use instead of
This commit is contained in:
@@ -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}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -193,8 +193,8 @@ export const CHARGING_STATIONS_STATUS_COUNT_QUERY = gql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const CHARGING_STATIONS_GET_QUERY = gql`
|
export const CHARGING_STATIONS_GET_QUERY = gql`
|
||||||
query GetChargingStationById($where: ChargingStations_bool_exp!) {
|
query GetChargingStationById($id: String!) {
|
||||||
ChargingStations(where: $where, limit: 1) {
|
ChargingStations(where: {id: {_eq: $id}}, limit: 1) {
|
||||||
id
|
id
|
||||||
tenantId
|
tenantId
|
||||||
ocppConnectionName
|
ocppConnectionName
|
||||||
|
|||||||
Reference in New Issue
Block a user