mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 22:02:26 -05: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:
parent
9813a044c0
commit
0d05bf473b
5 changed files with 197 additions and 4 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue