Improve Comment model to support multiple comment type.

This commit is contained in:
2025-06-26 20:54:35 +08:00
parent f18465bba3
commit 5d0b201fde
7 changed files with 112 additions and 37 deletions

View File

@@ -27,7 +27,11 @@ func GetActivityList(page int) ([]model.ActivityView, int, error) {
if err != nil {
return nil, 0, err
}
comment = c.ToViewWithResource()
r, err := dao.GetResourceByID(c.RefID)
if err != nil {
return nil, 0, err
}
comment = c.ToViewWithResource(&r)
} else if activity.Type == model.ActivityTypeNewResource || activity.Type == model.ActivityTypeUpdateResource {
r, err := dao.GetResourceByID(activity.RefID)
if err != nil {