More Stuff

This commit is contained in:
Caleb Gardner
2024-06-17 18:01:37 -05:00
parent fdd8d49055
commit fa9330a959
4 changed files with 89 additions and 3 deletions
+8
View File
@@ -77,6 +77,14 @@ func (b *BlogApp) Blog(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(blog)
}
func (b *BlogApp) CreateBlog(w http.ResponseWriter, r *http.Request) {
//TODO
}
func (b *BlogApp) UpdateBlog(w http.ResponseWriter, r *http.Request) {
//TODO
}
func (b *BlogApp) GetLatestBlogs(page int64) ([]Blog, error) {
res, err := b.blogCol.Find(context.Background(), bson.M{}, options.Find().
SetSort(bson.M{"createTime": 1}).