Add contract; Add auth-server base #1
1 changed files with 10 additions and 0 deletions
|
@ -30,3 +30,13 @@ func DeleteUser(login string) {
|
|||
ctx := storage.GetContext()
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue