Skip to content

Commit

Permalink
fixed search and edit announcements
Browse files Browse the repository at this point in the history
  • Loading branch information
APandamonium1 committed Aug 11, 2024
1 parent ecaf99f commit d82b763
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Binary file modified EduSync.exe
Binary file not shown.
3 changes: 2 additions & 1 deletion database.go
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ func updateAnnouncement(announcementID string, updates map[string]interface{}, r
if err := ref.Update(context.TODO(), updates); err != nil {
return fmt.Errorf("error updating announcement: %v", err)
}
return ref.Update(context.TODO(), updates)
// return ref.Update(context.TODO(), updates)
return nil
}

func deleteAnnouncement(announcementID string, req *http.Request) error {
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/edit_announcement.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

async function updateAnnouncement() {
const AnnouncementID = document.getElementById('announcementID').value;
const announcementID = document.getElementById('announcementID').value;
if (!hasChanges()) {
return; // No changes, so do not proceed with update
}
Expand Down

0 comments on commit d82b763

Please sign in to comment.