Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3,001 changes: 312 additions & 2,689 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"repomix": "repomix --style markdown"
},
"dependencies": {
"@supabase/supabase-js": "^2.49.4",
"cors": "^2.8.5",
"express": "^4.18.3",
"lucide-react": "^0.344.0",
Expand Down
19 changes: 19 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,24 @@ app.post('/api/terms', async (req, res) => {
}
});

// Mark all terms as understood
app.put('/api/terms/mark-all-understood', async (req, res) => {
try {
const now = new Date().toISOString();


const result = await run(
`UPDATE terms SET understood = ?, dateUnderstood = ? returning *`,
[1, now]
);

res.json({ success: true, result: result.rows });
} catch (error) {

res.status(500).json({ error: error.message });
}
});

// Update a term
app.put('/api/terms/:id', async (req, res) => {
try {
Expand All @@ -95,6 +113,7 @@ app.put('/api/terms/:id', async (req, res) => {
// Toggle understood status
app.put('/api/terms/:id/toggle', async (req, res) => {
try {

const { understood, dateUnderstood } = req.body;
await run(
'UPDATE terms SET understood = ?, dateUnderstood = ? WHERE id = ?',
Expand Down
1 change: 0 additions & 1 deletion server/public/assets/index-5cSF_eX0.css

This file was deleted.

Loading