mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-07 12:29:30 -06:00
move to ulid
This commit is contained in:
parent
625e6d654c
commit
26ee190338
51 changed files with 398 additions and 514 deletions
|
|
@ -4,11 +4,11 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/google/uuid"
|
||||
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/id"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/util"
|
||||
)
|
||||
|
||||
|
|
@ -66,7 +66,10 @@ func (p *processor) Fave(account *gtsmodel.Account, targetStatusID string) (*api
|
|||
}
|
||||
|
||||
if newFave {
|
||||
thisFaveID := uuid.NewString()
|
||||
thisFaveID, err := id.NewRandomULID()
|
||||
if err != nil {
|
||||
return nil, gtserror.NewErrorInternalError(err)
|
||||
}
|
||||
|
||||
// we need to create a new fave in the database
|
||||
gtsFave := >smodel.StatusFave{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue