trying fix store and reactive
This commit is contained in:
parent
c9792c39a3
commit
599d119eaf
2 changed files with 17 additions and 17 deletions
|
|
@ -72,25 +72,25 @@ namespace $.$$ {
|
||||||
@ $mol_mem
|
@ $mol_mem
|
||||||
users() {
|
users() {
|
||||||
const ref = $hyoo_crus_ref( this.$.$mol_fetch.text( '/join' ) )
|
const ref = $hyoo_crus_ref( this.$.$mol_fetch.text( '/join' ) )
|
||||||
return this.$.$hyoo_crus_glob.Node( ref, $hyoo_crus_dict )
|
return this.$.$hyoo_crus_glob.Node( ref, $hyoo_crus_list_vary )
|
||||||
}
|
}
|
||||||
|
|
||||||
@ $mol_mem
|
@ $mol_mem
|
||||||
home() {
|
home() {
|
||||||
// берем свой уголок
|
// берем свой уголок
|
||||||
const home = this.$.$hyoo_crus_glob.home( $hd_canary_app_home )
|
const home = this.$.$hyoo_crus_glob.home( $hd_canary_app_home )
|
||||||
home.land().join()
|
// home.land().join()
|
||||||
|
|
||||||
|
|
||||||
// проверяем есть ли он в базе
|
// проверяем есть ли он в базе
|
||||||
if (this.users().has(this.my_key()) == false) {
|
if (this.users().has(home.ref()) == false) {
|
||||||
|
|
||||||
// даем серверу права на запись
|
// даем серверу права на запись
|
||||||
const ref = $hyoo_crus_ref( this.$.$mol_fetch.text( '/ref' ) )
|
const ref = $hyoo_crus_ref( this.$.$mol_fetch.text( '/ref' ) )
|
||||||
home.land().give(ref, $hyoo_crus_rank_post("just"))
|
home.land().give(ref, $hyoo_crus_rank_rule)
|
||||||
|
|
||||||
// и заносим это в глобальную базу
|
// и заносим это в глобальную базу
|
||||||
this.users().dive(this.my_key(), $hyoo_crus_atom_vary, home.ref().description)
|
this.users().add(home.ref())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return home
|
return home
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,12 @@ namespace $ {
|
||||||
...{action:"tick", url: "_stat_update", title: "_stat_update" }
|
...{action:"tick", url: "_stat_update", title: "_stat_update" }
|
||||||
});
|
});
|
||||||
|
|
||||||
const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
const home_land = this.$.$hyoo_crus_glob.home().land()
|
||||||
const list = home_land.Node( $hyoo_crus_dict ).Item('')
|
const list = home_land.Node( $hyoo_crus_list_vary ).Item('')
|
||||||
|
|
||||||
for (const ref of list.keys()) {
|
for (const ref of list.items_vary()) {
|
||||||
try {
|
try {
|
||||||
const user = this.$.$hyoo_crus_glob.Node( $hyoo_crus_ref( ref as string ), $hd_canary_app_home )
|
const user = this.$.$hyoo_crus_glob.Node((ref as $hyoo_crus_ref), $hd_canary_app_home )
|
||||||
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
for (const site of user.Sites(null)?.remote_list() ?? []) {
|
||||||
site.tick()
|
site.tick()
|
||||||
}
|
}
|
||||||
|
|
@ -31,6 +31,7 @@ namespace $ {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ $mol_memo.method
|
@ $mol_memo.method
|
||||||
|
|
@ -42,14 +43,13 @@ namespace $ {
|
||||||
export class $hd_canary_join extends $mol_rest_resource {
|
export class $hd_canary_join extends $mol_rest_resource {
|
||||||
|
|
||||||
GET( msg: $mol_rest_message ) {
|
GET( msg: $mol_rest_message ) {
|
||||||
// const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
const home_land = this.$.$hyoo_crus_glob.home().land()
|
||||||
// home_land.give(null, $hyoo_crus_rank_join("just"))
|
home_land.give(null, $hyoo_crus_rank_rule)
|
||||||
// msg.reply( home_land.ref().description! )
|
|
||||||
|
|
||||||
|
const list = home_land.Node( $hyoo_crus_list_vary ).Item('')
|
||||||
|
|
||||||
const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
// const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home_server ).land()
|
||||||
const list = home_land.Node( $hyoo_crus_dict ).Item('')
|
// home_land.give(null, $hyoo_crus_rank_rule)
|
||||||
list.land().give(null, $hyoo_crus_rank_rule)
|
|
||||||
msg.reply( list.ref().description! )
|
msg.reply( list.ref().description! )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -61,4 +61,4 @@ $.$hd_canary.serve()
|
||||||
/*
|
/*
|
||||||
npm start
|
npm start
|
||||||
+ hd/canary port=9090
|
+ hd/canary port=9090
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue