alpha
Login
or
Join now
willdot.net
/
distributed-pds
forked from
willdot.net/cocoon
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A fork of the Cocoon PDS but being made more distributed.
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
no postgres brain
author
Hailey
date
1 year ago
(Mar 29, 2025, 5:34 PM -0700)
commit
3aee1775
3aee177533f91a0de83f133959eb41fa58ec6727
parent
9edbcc7a
9edbcc7ac2a7db0f96547f83ca8004acd1d0a0ac
+5
-1
1 changed file
Expand all
Collapse all
Unified
Split
server
handle_server_confirm_email.go
+5
-1
server/handle_server_confirm_email.go
Reviewed
···
1
1
package server
2
2
3
3
import (
4
4
+
"time"
5
5
+
4
6
"github.com/Azure/go-autorest/autorest/to"
5
7
"github.com/haileyok/cocoon/internal/helpers"
6
8
"github.com/haileyok/cocoon/models"
···
33
35
return helpers.InputError(e, to.StringPtr("InvalidToken"))
34
36
}
35
37
36
36
-
if err := s.db.Exec("UPDATE repos SET email_verification_code = NULL, email_confirmed_at = NOW() WHERE did = ?", urepo.Repo.Did).Error; err != nil {
38
38
+
now := time.Now().UTC()
39
39
+
40
40
+
if err := s.db.Exec("UPDATE repos SET email_verification_code = NULL, email_confirmed_at = ? WHERE did = ?", now, urepo.Repo.Did).Error; err != nil {
37
41
s.logger.Error("error updating user", "error", err)
38
42
return helpers.ServerError(e, nil)
39
43
}