diff --git a/plugins/notice.go b/plugins/notice.go index 21aeaa7..efe4ae7 100644 --- a/plugins/notice.go +++ b/plugins/notice.go @@ -2,11 +2,12 @@ package plugins import "github.com/spo-iitk/ras-backend/mail" +// was used in rc/admin.notice.go::postNoticeHandler is stale now func NewNoticeNotification(mail_channel chan mail.Mail, id uint, recruitmentCycleID uint, title string, description string, createdBy string) { if recruitmentCycleID != 6 { return } - var emails []string + var emails []string = []string{"harshitr20@iitk.ac.in"} message := "A new notice has been created by " + createdBy + " with title " + title + " in Placement 2023-24 Phase 1.\n\nDescription: " + description + "\n\nClick here to view the notice: https://placement.iitk.ac.in/student/rc/6/notices" mail_channel <- mail.GenerateMails(emails, "God Notice: "+title, message) } diff --git a/rc/admin.notice.go b/rc/admin.notice.go index a8e1ee7..c66b66e 100644 --- a/rc/admin.notice.go +++ b/rc/admin.notice.go @@ -7,7 +7,6 @@ import ( "github.com/gin-gonic/gin" "github.com/spo-iitk/ras-backend/mail" "github.com/spo-iitk/ras-backend/middleware" - "github.com/spo-iitk/ras-backend/plugins" "github.com/spo-iitk/ras-backend/util" ) @@ -46,7 +45,7 @@ func postNoticeHandler(mail_channel chan mail.Mail) gin.HandlerFunc { } // As a custom plugin by RAS God Harshit Raj, feel free to remove this after 2023. :P - plugins.NewNoticeNotification(mail_channel, notice.ID, notice.RecruitmentCycleID, notice.Title, notice.Description, notice.CreatedBy) + // plugins.NewNoticeNotification(mail_channel, notice.ID, notice.RecruitmentCycleID, notice.Title, notice.Description, notice.CreatedBy) ctx.JSON(http.StatusOK, gin.H{"status": "notice created"}) }