My variable is not updating on a backend script.

import {ok, notFound, serverError, created} from 'wix-http-functions';
import wixData from 'wix-data';
import {fetch} from 'wix-fetch'

var Verified = {}
var test = false

async function ReturnValue(json) {
 let options = {
 "headers": {
 "Content-Type": "application/json"
        },
 "body": JSON.stringify(json)
    };
 
 return ok(options)
}

export async function post_approveverify(request) {
 const bodyjson = await request.body.json()

 Verified[bodyjson.wixid] = Date.now()
 test = true //This always runs before the checkverify function
 console.log("changed test variable")
 
 return ReturnValue({
  "Success": true
 })
}

export async function post_checkverify(request) {
 const bodyjson = await request.body.json()

 console.log(test) //Always prints false even after the value is set in the other function

 return ReturnValue({
 "Success": false
 })
}

The variable “test” is not updating for some reason and I can’t figure out why.

This is still an issue

still an issue

Global variables are not supported.

Development is currently underway to provide a solution to this issue.

Do you know the ETA on how long this will take as it is a very important feature that I need for my website.

@axillarystudios I really have no clue. I was just told that this is under development.