mirror of
https://github.com/nfonteyne/octane-website.git
synced 2026-09-03 23:24:48 +02:00
fix: cant add multiple future rehersals
This commit is contained in:
parent
749abda8ba
commit
5e28345ed5
7 changed files with 196 additions and 35 deletions
|
|
@ -11,6 +11,16 @@ async function findNext() {
|
|||
return rows[0] || null;
|
||||
}
|
||||
|
||||
async function findUpcoming() {
|
||||
const { rows } = await pool.query(
|
||||
`SELECT id, name, venue, concert_date, created_by, created_at, updated_at
|
||||
FROM setlists
|
||||
WHERE concert_date >= CURRENT_DATE
|
||||
ORDER BY concert_date ASC`
|
||||
);
|
||||
return rows;
|
||||
}
|
||||
|
||||
async function findHistory() {
|
||||
const { rows } = await pool.query(
|
||||
`SELECT id, name, venue, concert_date, created_by, created_at, updated_at
|
||||
|
|
@ -152,6 +162,7 @@ async function getStats() {
|
|||
|
||||
module.exports = {
|
||||
findNext,
|
||||
findUpcoming,
|
||||
findHistory,
|
||||
findHistoryWithSongs,
|
||||
findById,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue