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
|
||||
users() {
|
||||
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
|
||||
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' ) )
|
||||
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
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ namespace $ {
|
|||
...{action:"tick", url: "_stat_update", title: "_stat_update" }
|
||||
});
|
||||
|
||||
const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
||||
const list = home_land.Node( $hyoo_crus_dict ).Item('')
|
||||
const home_land = this.$.$hyoo_crus_glob.home().land()
|
||||
const list = home_land.Node( $hyoo_crus_list_vary ).Item('')
|
||||
|
||||
for (const ref of list.keys()) {
|
||||
for (const ref of list.items_vary()) {
|
||||
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() ?? []) {
|
||||
site.tick()
|
||||
}
|
||||
|
|
@ -31,6 +31,7 @@ namespace $ {
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ $mol_memo.method
|
||||
|
|
@ -42,14 +43,13 @@ namespace $ {
|
|||
export class $hd_canary_join extends $mol_rest_resource {
|
||||
|
||||
GET( msg: $mol_rest_message ) {
|
||||
// const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
||||
// home_land.give(null, $hyoo_crus_rank_join("just"))
|
||||
// msg.reply( home_land.ref().description! )
|
||||
const home_land = this.$.$hyoo_crus_glob.home().land()
|
||||
home_land.give(null, $hyoo_crus_rank_rule)
|
||||
|
||||
const list = home_land.Node( $hyoo_crus_list_vary ).Item('')
|
||||
|
||||
const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home ).land()
|
||||
const list = home_land.Node( $hyoo_crus_dict ).Item('')
|
||||
list.land().give(null, $hyoo_crus_rank_rule)
|
||||
// const home_land = this.$.$hyoo_crus_glob.home( $hd_canary_app_home_server ).land()
|
||||
// home_land.give(null, $hyoo_crus_rank_rule)
|
||||
msg.reply( list.ref().description! )
|
||||
}
|
||||
|
||||
|
|
@ -61,4 +61,4 @@ $.$hd_canary.serve()
|
|||
/*
|
||||
npm start
|
||||
+ hd/canary port=9090
|
||||
*/
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue