mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 12:17:24 +00:00
Improve Comment model to support multiple comment type.
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user