Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
whitebear60 committed May 12, 2024
1 parent 2a01c8c commit d405a87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Binary file removed 128932.webp
Binary file not shown.
5 changes: 1 addition & 4 deletions herbinstitute_create.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SET SQL_SAFE_UPDATES = 0;
DROP DATABASE IF EXISTS `herb_institute`;
CREATE DATABASE IF NOT EXISTS `herb_institute`;
USE `herb_institute`;
Expand Down Expand Up @@ -192,11 +193,7 @@ INSERT INTO `SORT` (`name`, `year`, `adaptation`, `frost`, `approved`, `period`)

('Weißer Wintertaffetapfel', 1797, true, true, true, 3);



# DROP TRIGGER new_sort_date;



INSERT INTO herb_institute.NEW_SORT (new_sort_id, date, comment) VALUES

Expand Down
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ const handleDelete = (req, res) => {
}
}

app.use('/', express.static(path.join(currDir(import.meta.url), 'static')))

const standard_routes = ['batch', 'client', 'new_sort', 'packing', 'purchase', 'seller', 'sort']

/**
* @param {Request} req
Expand Down Expand Up @@ -323,6 +320,10 @@ const handlePost = (req, res, route) => {
// console.log(req);
}
};
app.use('/', express.static(path.join(currDir(import.meta.url), 'static')))

const standard_routes = ['batch', 'client', 'new_sort', 'packing', 'purchase', 'seller', 'sort']

standard_routes.forEach((route) => {
app.get(`/${route}`, (req, res) => handleGet(req, res))
.post(`/${route}`, (req, res) => handlePost(req, res, route))
Expand Down

0 comments on commit d405a87

Please sign in to comment.