Skip to content

Commit

Permalink
feat: get context
Browse files Browse the repository at this point in the history
  • Loading branch information
krantheman committed May 2, 2024
1 parent fce5b42 commit c27c354
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions hrms/www/roster.py
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions roster/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit c27c354

Please sign in to comment.