♻️ Replace i18n services with nexus one

This commit is contained in:
2025-02-02 14:28:03 +08:00
parent ec0048042a
commit eaa8fb5225
10 changed files with 38 additions and 119 deletions

View File

@@ -2,6 +2,7 @@ package services
import (
"fmt"
"git.solsynth.dev/hypernet/nexus/pkg/nex/localize"
"time"
"git.solsynth.dev/hypernet/passport/pkg/authkit/models"
@@ -137,8 +138,8 @@ func ActiveTicket(ticket models.AuthTicket) (models.AuthTicket, error) {
_ = NewNotification(models.Notification{
Topic: "passport.security.alert",
Title: GetLocalizedString("subjectLoginAlert", account.Language),
Body: fmt.Sprintf(GetLocalizedString("shortBodyLoginAlert", account.Language), ticket.IpAddress),
Title: localize.L.GetLocalizedString("subjectLoginAlert", account.Language),
Body: fmt.Sprintf(localize.L.GetLocalizedString("shortBodyLoginAlert", account.Language), ticket.IpAddress),
Metadata: datatypes.JSONMap{
"ip_address": ticket.IpAddress,
"created_at": ticket.CreatedAt,