Update sea.js

This commit is contained in:
Mark Nadal 2021-07-10 22:31:00 -07:00
parent 99bc6b5aef
commit 03f939ee1c

10
sea.js
View File

@ -1040,10 +1040,12 @@
;USE(function(module){ ;USE(function(module){
var User = USE('./user'), SEA = User.SEA, Gun = User.GUN, noop = function(){}; var User = USE('./user'), SEA = User.SEA, Gun = User.GUN, noop = function(){};
User.prototype.pair = function(){ User.prototype.pair = function(){
console.log("user.pair() IS DEPRECATED AND WILL BE DELETED!!!"); var user = this, proxy; // undeprecated, hiding with proxies.
var user = this; try{ proxy = new Proxy({}, {get: function(t,p,r){
if(!user.is){ return false } if(!user.is || !(user._||'').sea){ return }
return user._.sea; return user._.sea[p];
}})}catch(e){}
return proxy;
} }
// If authenticated user wants to delete his/her account, let's support it! // If authenticated user wants to delete his/her account, let's support it!
User.prototype.delete = async function(alias, pass, cb){ User.prototype.delete = async function(alias, pass, cb){