experimental webdav upload

This commit is contained in:
ston1th 2019-08-31 16:43:54 +02:00
commit 7570b09f9f
10 changed files with 47 additions and 2 deletions

View file

@ -64,6 +64,14 @@ func (db *DB) CreateUser(username, password string) error {
})
}
func (db *DB) BasicAuth(username, password string) bool {
_, err := db.Login(username, password)
if err == nil {
return true
}
return false
}
func (db *DB) Login(username, password string) (u core.User, err error) {
u, err = db.GetUser()
if err != nil {