1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-02-04 02:04:08 +02:00

reset the requestData Admin and AuthRecord fields

This commit is contained in:
Gani Georgiev 2023-07-17 00:05:01 +03:00
parent f421da4b9b
commit 81bd1a1732

View File

@ -96,6 +96,8 @@ func (api *fileApi) download(c echo.Context) error {
// create a copy of the cached request data and adjust it to the current auth record
requestData := *RequestData(c)
requestData.Admin = nil
requestData.AuthRecord = nil
if adminOrAuthRecord != nil {
if admin, _ := adminOrAuthRecord.(*models.Admin); admin != nil {
requestData.Admin = admin