mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
WebClient: refactor long-running tasks to improve browser compatibility
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -3247,6 +3247,9 @@ func sqlCommonGetSession(key string, dbHandle sqlQuerier) (Session, error) {
|
||||
var data []byte // type hint, some driver will use string instead of []byte if the type is any
|
||||
err := dbHandle.QueryRowContext(ctx, q, key).Scan(&session.Key, &data, &session.Type, &session.Timestamp)
|
||||
if err != nil {
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return session, util.NewRecordNotFoundError(err.Error())
|
||||
}
|
||||
return session, err
|
||||
}
|
||||
session.Data = data
|
||||
|
||||
Reference in New Issue
Block a user