Compare commits
4 Commits
010c8fd0bb
...
SQLBackend
| Author | SHA1 | Date | |
|---|---|---|---|
| c340821d39 | |||
| 9bc1abe9a5 | |||
| 91e70f8a34 | |||
| 22957f6159 |
@@ -23,6 +23,12 @@ CREATE TABLE `tabs` (
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `categories` (
|
||||
`id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`name` VARCHAR(50),
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
CREATE TABLE `messages` (
|
||||
`id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`message` VARCHAR(255),
|
||||
@@ -54,4 +60,4 @@ CREATE TABLE `themes` (
|
||||
`colortextacc` VARCHAR(9),
|
||||
`colorborder` VARCHAR(9),
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
);
|
||||
|
||||
@@ -87,11 +87,13 @@ app.get("/sui/api/providers", (req, res) => {
|
||||
if (error) throw error;
|
||||
res.status(200).send(results);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
app.get("/sui/api/themes", (req, res) => {
|
||||
res.status(200).send(themes.themes);
|
||||
con.query('SELECT * FROM themes', (error, results, fields) => {
|
||||
if (error) throw error;
|
||||
res.status(200).send(results);
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/sui/api/personaldata", (req, res) => {
|
||||
|
||||
@@ -23,7 +23,7 @@ export function greet() {
|
||||
let currentTime = new Date();
|
||||
let greet = Math.floor(currentTime.getHours() / 6);
|
||||
let easterEggChance = Math.floor(Math.random() * 100);
|
||||
let greetings = require('../messages.json');
|
||||
let greetings = require("../messages.json");
|
||||
let timeBased = [];
|
||||
let easterEggs = [];
|
||||
for (var i = 0; i < greetings.messages.length; i++) {
|
||||
|
||||
@@ -7,7 +7,7 @@ function PersonalInfo() {
|
||||
const getData = async () => {
|
||||
const response = await fetch("/sui/api/personaldata");
|
||||
const data = await response.json();
|
||||
setState(data);
|
||||
setState(data[0]);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user