feat: implement core backend architecture and project management services for the History API
Build and Release / release (push) Successful in 1m33s

This commit is contained in:
2026-06-05 14:18:55 +07:00
parent 420a9ad43a
commit fdcd44cc00
70 changed files with 944 additions and 734 deletions
+1 -2
View File
@@ -2,7 +2,6 @@ package repositories
import (
"context"
"fmt"
"history-api/pkg/cache"
"history-api/pkg/constants"
"time"
@@ -25,7 +24,7 @@ func NewUsageRepository(c cache.Cache) UsageRepository {
func (r *usageRepository) getUsageKey(userID string) string {
dateStr := time.Now().Format("20060102")
return fmt.Sprintf("usage:ai:%s:%s", userID, dateStr)
return cache.Key2("usage:ai", userID, dateStr)
}
func (r *usageRepository) GetAIUsage(ctx context.Context, userID string) (int, error) {