mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[bug] Fix status API / status web API being case sensitive (#481)
* make getStatus by id case-insensitive * test get status case insensitive * init config before log
This commit is contained in:
@ -62,8 +62,8 @@ func (p *processor) GetStatus(ctx context.Context, requestedUsername string, req
|
||||
// get the status out of the database here
|
||||
s := >smodel.Status{}
|
||||
if err := p.db.GetWhere(ctx, []db.Where{
|
||||
{Key: "id", Value: requestedStatusID},
|
||||
{Key: "account_id", Value: requestedAccount.ID},
|
||||
{Key: "id", Value: requestedStatusID, CaseInsensitive: true},
|
||||
{Key: "account_id", Value: requestedAccount.ID, CaseInsensitive: true},
|
||||
}, s); err != nil {
|
||||
return nil, gtserror.NewErrorNotFound(fmt.Errorf("database error getting status with id %s and account id %s: %s", requestedStatusID, requestedAccount.ID, err))
|
||||
}
|
||||
|
Reference in New Issue
Block a user