Skip to content

Commit

Permalink
sort guests dump, guests access fence, less guests data
Browse files Browse the repository at this point in the history
  • Loading branch information
jin committed Jun 17, 2024
1 parent a94d35b commit 0009c18
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion meetup/guests/guests.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $piterjs_meetup_guests $mol_page
title \Список гостей
tools /
<= Dump $mol_button_download
file_name \guests.csv
file_name \guests.txt
blob <= dump_blob $mol_blob
<= Close $mol_link
arg * guests null
Expand Down
12 changes: 5 additions & 7 deletions meetup/guests/guests.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ namespace $.$$ {

@ $mol_mem
dump_blob() {
const table = this.meetup().joined_list().map( person => ({
id: person,
real_name: this.person( person ),
visitor: this.visitor( person ),
}) )
const text = $mol_csv_serial( table )
return new $mol_blob( [ text ], { type: 'text/csv' } )
const text = this.meetup().joined_list()
.map( person => this.person( person ) )
.sort()
.join( '\n' )
return new $mol_blob( [ text ], { type: 'text/plain' } )
}

@ $mol_mem_key
Expand Down
3 changes: 3 additions & 0 deletions meetup/meetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ namespace $ {

@ $mol_mem_key
joined_name( id: $mol_int62_string, next?: string ) {

$mol_wire_solid()

const secret = $mol_wire_sync( this.peer_secret( id )! )
const salt = $mol_crypto_hash( $mol_charset_encode( this.id() ) ).slice( 0, 16 )

Expand Down Expand Up @@ -143,6 +145,7 @@ namespace $ {

@ $mol_mem
joined_list() {
if( !this.editable() ) $mol_fail( new Error( 'Access Denied' ) )
return this.joined_node()?.keys() as $mol_int62_string[] ?? []
}

Expand Down

0 comments on commit 0009c18

Please sign in to comment.