issue #358: annotation -> lookup-annotation

db4
Doug Coleman 2012-06-20 22:50:48 -07:00
parent 7441fa81fc
commit c97b2c5190
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ TUPLE: annotation < entity parent ;
swap >>id swap >>id
swap >>parent ; swap >>parent ;
: annotation ( id -- annotation ) : lookup-annotation ( id -- annotation )
[ f ] dip <annotation> select-tuple ; [ f ] dip <annotation> select-tuple ;
: paste ( id -- paste ) : paste ( id -- paste )
@ -226,7 +226,7 @@ M: annotation entity-url
: <raw-annotation-action> ( -- action ) : <raw-annotation-action> ( -- action )
<action> <action>
[ validate-integer-id "id" value annotation from-object ] >>init [ validate-integer-id "id" value lookup-annotation from-object ] >>init
[ "contents" value "text/plain" <content> ] >>display ; [ "contents" value "text/plain" <content> ] >>display ;
: <delete-annotation-action> ( -- action ) : <delete-annotation-action> ( -- action )
@ -235,7 +235,7 @@ M: annotation entity-url
[ { { "id" [ v-number ] } } validate-params ] >>validate [ { { "id" [ v-number ] } } validate-params ] >>validate
[ [
f "id" value annotation f "id" value lookup-annotation
[ delete-tuples ] [ delete-tuples ]
[ parent>> paste-url <redirect> ] [ parent>> paste-url <redirect> ]
bi bi