webupdate
This commit is contained in:
23
backend/get-privacy.js
Normal file
23
backend/get-privacy.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { Pool } = require("pg");
|
||||
|
||||
const pool = new Pool({
|
||||
host: "localhost",
|
||||
database: "skyartshop",
|
||||
user: "skyartapp",
|
||||
password: "SkyArt2025Pass",
|
||||
});
|
||||
|
||||
async function getPrivacy() {
|
||||
try {
|
||||
const result = await pool.query(
|
||||
"SELECT pagedata FROM pages WHERE slug = 'privacy'",
|
||||
);
|
||||
console.log(JSON.stringify(result.rows[0]?.pagedata, null, 2));
|
||||
} catch (error) {
|
||||
console.error("Error:", error.message);
|
||||
} finally {
|
||||
await pool.end();
|
||||
}
|
||||
}
|
||||
|
||||
getPrivacy();
|
||||
Reference in New Issue
Block a user