diff options
Diffstat (limited to 'database/comments.go')
| -rw-r--r-- | database/comments.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/database/comments.go b/database/comments.go new file mode 100644 index 0000000..1203be4 --- /dev/null +++ b/database/comments.go @@ -0,0 +1,11 @@ +package database + +import ( + "imageboard/models" +) + +func GetTotalCommentsCount() (int64, error) { + var count int64 + err := DB.Model(&models.Comment{}).Count(&count).Error + return count, err +} |
