@liiift-studio/sales-portal 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY);
14
14
  const client = createClient({
15
15
  projectId: process.env.SANITY_STUDIO_PROJECT_ID,
16
16
  dataset: process.env.SANITY_STUDIO_DATASET,
17
- apiVersion: process.env.SANITY_STUDIO_API_VERSION,
17
+ apiVersion: process.env.SANITY_STUDIO_API_VERSION || '2022-04-01',
18
18
  token: process.env.SANITY_STUDIO_TOKEN,
19
19
  useCdn: false, // Ensures fresh data by bypassing CDN
20
20
  });
@@ -43,7 +43,8 @@ export default async function handler(req, res) {
43
43
 
44
44
  // Authenticate designer using Sanity
45
45
  const designer = await client.fetch(
46
- `*[_type == "account" && email == '${user}' && password == '${password}' && isDesigner][0]`
46
+ `*[_type == "account" && email == $user && password == $password && isDesigner][0]`,
47
+ { user, password }
47
48
  );
48
49
 
49
50
  if (designer) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liiift-studio/sales-portal",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Centralized sales portal package for Liiift Studio projects",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",