From c27c354300c2c5d659cf7dba2dd80ccef7db00b3 Mon Sep 17 00:00:00 2001 From: krantheman Date: Thu, 2 May 2024 15:50:43 +0530 Subject: [PATCH] feat: get context --- hrms/www/roster.py | 9 +++++++++ roster/vite.config.js | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 hrms/www/roster.py diff --git a/hrms/www/roster.py b/hrms/www/roster.py new file mode 100644 index 0000000000..ed97f99c6a --- /dev/null +++ b/hrms/www/roster.py @@ -0,0 +1,9 @@ +import frappe + + +def get_context(context): + csrf_token = frappe.sessions.get_csrf_token() + frappe.db.commit() # nosempgrep + context = frappe._dict() + context.csrf_token = csrf_token + return context diff --git a/roster/vite.config.js b/roster/vite.config.js index 0c36590017..72f2dc0ed5 100644 --- a/roster/vite.config.js +++ b/roster/vite.config.js @@ -2,14 +2,13 @@ import { defineConfig } from "vite"; import vue from "@vitejs/plugin-vue"; import fs from "fs"; import path from "path"; -import { webserver_port } from "../../../sites/common_site_config.json"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], server: { port: 8081, - proxy: getProxyOptions({ port: webserver_port }), + proxy: getProxyOptions(), }, resolve: { alias: {