feat: initialize database connection module for data persistence
This commit is contained in:
@@ -3,7 +3,7 @@ import { pb } from './pb';
|
||||
// ── Topics ──────────────────────────────────────────────────────────────────
|
||||
|
||||
export async function getTopics() {
|
||||
return pb.collection('topics').getFullList({ sort: 'created' });
|
||||
return pb.collection('topics').getFullList();
|
||||
}
|
||||
|
||||
export async function saveTopics(topics) {
|
||||
@@ -100,7 +100,7 @@ export async function deleteQuestionFromBank(topicId, questionId) {
|
||||
// ── Sources ──────────────────────────────────────────────────────────────────
|
||||
|
||||
export async function getSources() {
|
||||
return pb.collection('sources').getFullList({ sort: '-created' });
|
||||
return pb.collection('sources').getFullList();
|
||||
}
|
||||
|
||||
export async function addSource(source) {
|
||||
@@ -118,7 +118,7 @@ export async function deleteSource(id) {
|
||||
// ── Team Members ─────────────────────────────────────────────────────────────
|
||||
|
||||
export async function getTeamMembers() {
|
||||
return pb.collection('team_members').getFullList({ sort: 'created' });
|
||||
return pb.collection('team_members').getFullList();
|
||||
}
|
||||
|
||||
export async function addTeamMember(member) {
|
||||
|
||||
Reference in New Issue
Block a user