Rank 1: Thread
]I have a doubt. I was using Appwrite in version 1.3 and updated to version 1.4. I would like to know if there have been changes to the structure or if I can use the functions from version 1.3 in version 1.4?
function 1.3
module.exports = async function (req, res) {
const client = new Client()
.setEndpoint(req.variables['APPWRITE_FUNCTION_ENDPOINT'])
.setProject(req.variables['APPWRITE_FUNCTION_PROJECT_ID'])
.setKey(req.variables['APPWRITE_FUNCTION_API_KEY'])
.setSelfSigned(true);
const databases = new Databases(client);
const reqPayload = req.payload;
const { id_order} = JSON.parse(reqPayload);
}```
Or do I really need to put it in this model below
function 1.4
module.exports = async function (context) {
const client = new Client()
.setEndpoint(process.env["APPWRITE_FUNCTION_ENDPOINT"])
.setProject(process.env["APPWRITE_FUNCTION_PROJECT_ID"])
.setKey(process.env["APPWRITE_FUNCTION_API_KEY"])
.setSelfSigned(true);
const databases = new Databases(client);
const body = context.req.bodyRaw;