func parseUserFromRequest(c *fb.Context) (*fb.UserModel, string, error) {
	if c.REQ.Body == nil {
		return nil, "", cnst.ErrEmptyRequest
	}
	mod := &ModifyUserRequest{}
	err := json.NewDecoder(c.REQ.Body).Decode(mod)
	if err != nil {
		return nil, "", err
	}
	if mod.What != "user" {
		return nil, "", cnst.ErrWrongDataType
	}
	mod.Data.FileSystem = c.NewFS(c.GetUserHomePath())
	mod.Data.FileSystemPreview = c.NewFS(c.GetUserPreviewPath())
	return mod.Data, mod.Which, nil
}
parseUserFromRequest returns the user which is present in the request
body. If the body is empty or the JSON is invalid, it
returns an fb.Error.
package web
import (
	"encoding/json"
	"errors"
	"github.com/browsefile/backend/src/cnst"
	"net/http"
	"os"
	"strings"
	fb "github.com/browsefile/backend/src/lib"
)
type ModifyRequest struct {
	What  string `json:"what"`   
	Which string `json:"which"`  
}
type ModifyUserRequest struct {
	ModifyRequest
	Data *fb.UserModel `json:"data"`
}
func usersHandler(c *fb.Context) (int, error) {
	if !c.User.Admin && c.Method != http.MethodGet {
		return http.StatusForbidden, nil
	}
	switch c.Method {
	case http.MethodGet:
		return usersGetHandler(c)
	case http.MethodPost:
		return usersPostHandler(c)
	case http.MethodDelete:
		return usersDeleteHandler(c)
	case http.MethodPut:
		return usersPutHandler(c)
	}
	return http.StatusNotImplemented, nil
}
func getUserName(r string) (string) {
	sid := strings.TrimPrefix(r, "/")
	sid = strings.TrimSuffix(sid, "/")
	return sid
}