Can I Update the joget app_message Table using mysql

Confluence User - 28 Feb, 2024

we are Working on an application that Requires us to change  the Locale from English to Japanese.

Now user Department wants them To Update Directly the locale without we as Intermediate.

We have Created a Form and Written update query to update the app_message Table of joget

is it proper to do that.

forms;user;locale;internationalization;sql;jogetdx;jogetdx8

2


04 Mar, 2024
confluenceUser
confluenceUser

Hi, yes you should be able to directly update the database table.

12 Mar, 2024
confluenceUser
confluenceUser

can i am updating the app_message Table using the below api in javascript

https://your_cloud_name/jw/web/json/console/app/your_app_Name/app_version/message/submit
and it is working
is it safe to use.


My team is Saying that Updating the Database with this api is Not proper for the Application Security 

because it can get expose to the users and Joget.

And if Joget shut Down the Internal Use of that API then it will create a big problem. 


$(document).ready(function(){
        function post_data(){
      const url = "https://your_cloud_name/jw/web/json/console/app/your_app_name/app_version/message/submit";

    // Replace the following data with your actual payload
    const payload = {
        locale: "ja_JP",
        data: JSON.stringify([
            {"id":`${$('[name=ouid]')}`,"key":`${$('#message_key').val()}`,"value":`${$('#new_value').val()}`}
        ]),
    };

    const headers = {
        "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
        // Add more headers as needed
    };

    fetch(url, {
                method: "POST",
                headers: headers,
                body: new URLSearchParams(payload).toString(),
            })
            .then(response => {
                console.log("Status Code:", response.status);
                return response.text();
            })
            .then(data => {
                console.log("Response Content:", data);
                window.location.href = "https://your_cloud_name/jw/web/json/console/app/your_app_name/app_version/message/submit";
        
            })
            .catch(error => {
                console.error("Error:", error);
            });
    }
        
    $('.click').click(post_data);
})

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print