Add contract; Add auth-server base #1

Merged
regnersen merged 13 commits from auth-server into master 2024-01-13 17:51:08 +00:00
Showing only changes of commit 79e7443176 - Show all commits

View file

@ -30,3 +30,13 @@ func DeleteUser(login string) {
ctx := storage.GetContext() ctx := storage.GetContext()
storage.Delete(ctx, login) storage.Delete(ctx, login)
} }
func UpdateUser(login string, password interop.Hash256) {
ctx := storage.GetContext()
storedValue := storage.Get(ctx, login).(interop.Hash256)
if storedValue == nil {
panic("This user does not exist")
} else {
storage.Put(ctx, login, password)
}
}