feat: cards
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@ -47,6 +48,7 @@ func (h *ItemHandler) GetItems(ctx context.Context, req *connect.Request[itemv1.
|
||||
// Filters
|
||||
sql := h.db.Where("user_id = ?", userid)
|
||||
if req.Msg.Start != nil {
|
||||
log.Println(req.Msg.Start)
|
||||
sql = sql.Where("added >= ?", req.Msg.Start.AsTime())
|
||||
}
|
||||
if req.Msg.End != nil {
|
||||
|
@ -151,6 +151,7 @@ func (h *UserHandler) UpdateProfilePicture(ctx context.Context, req *connect.Req
|
||||
// Update user profile picture
|
||||
fid := uint(file.ID)
|
||||
user.ProfilePictureID = &fid
|
||||
user.ProfilePicture = &file
|
||||
if err := h.db.Save(&user).Error; err != nil {
|
||||
return nil, connect.NewError(connect.CodeInternal, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user