feat(calendar): 일정 목록을 전 구성원 공유로 반환(편집·삭제는 소유자만)
All checks were successful
build-and-push / build (push) Successful in 33s

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
theorose49 2026-06-30 16:15:17 +09:00
parent 995dd36167
commit 317db37a04

View File

@ -10,9 +10,11 @@ import (
// 개인 캘린더 — 각자 본인 이벤트만 보고 관리(분류: 프로젝트/기타/개인 + 색). // 개인 캘린더 — 각자 본인 이벤트만 보고 관리(분류: 프로젝트/기타/개인 + 색).
// handleListEvents returns ALL members' events (회사 공유 캘린더) so the UI can
// filter by member checkboxes. Editing/deleting stays owner-only.
func (s *Server) handleListEvents(w http.ResponseWriter, r *http.Request) { func (s *Server) handleListEvents(w http.ResponseWriter, r *http.Request) {
var out []models.CalendarEvent var out []models.CalendarEvent
s.db.Where("lower(owner_email) = lower(?)", s.email(r)).Order("start asc").Find(&out) s.db.Order("start asc").Find(&out)
writeJSON(w, http.StatusOK, out) writeJSON(w, http.StatusOK, out)
} }