feat(chat): store chats in Postgres
This commit is contained in:
@@ -27,8 +27,9 @@ type ChatPageResponse struct {
|
||||
}
|
||||
|
||||
func (r CreateChatRequest) Validate() bool {
|
||||
titleLen := utf8.RuneCountInString(r.Title)
|
||||
if strings.TrimSpace(r.Title) == "" || titleLen > 100 {
|
||||
if strings.TrimSpace(r.Title) == "" ||
|
||||
strings.ContainsRune(r.Title, 0) ||
|
||||
utf8.RuneCountInString(r.Title) > 100 {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user