implement proper timestamps

This commit is contained in:
2025-03-24 11:45:54 -04:00
parent d1e77ad4e2
commit 8948640311
3 changed files with 38 additions and 10 deletions

View File

@@ -1,10 +1,12 @@
package api
import "time"
var messages = []*Message{
{ID: "1", UserID: 1, Body: "hello", Timestamp: 1234567890},
{ID: "2", UserID: 2, Body: "world", Timestamp: 1234567890},
{ID: "3", UserID: 1, Body: "abababa", Timestamp: 1234567890},
{ID: "4", UserID: 2, Body: "bitch", Timestamp: 1234567890},
{ID: "1", UserID: 1, Body: "hello", Timestamp: time.Now()},
{ID: "2", UserID: 2, Body: "world", Timestamp: time.Now()},
{ID: "3", UserID: 1, Body: "abababa", Timestamp: time.Now()},
{ID: "4", UserID: 2, Body: "bitch", Timestamp: time.Now()},
}
var users = []*User{