From c97b2c5190921ced47b9f4d32b2d09080b1a6e25 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 20 Jun 2012 22:50:48 -0700 Subject: [PATCH] issue #358: annotation -> lookup-annotation --- extra/webapps/pastebin/pastebin.factor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extra/webapps/pastebin/pastebin.factor b/extra/webapps/pastebin/pastebin.factor index fccf47d468..deb3a543b2 100644 --- a/extra/webapps/pastebin/pastebin.factor +++ b/extra/webapps/pastebin/pastebin.factor @@ -77,7 +77,7 @@ TUPLE: annotation < entity parent ; swap >>id swap >>parent ; -: annotation ( id -- annotation ) +: lookup-annotation ( id -- annotation ) [ f ] dip select-tuple ; : paste ( id -- paste ) @@ -226,7 +226,7 @@ M: annotation entity-url : ( -- action ) - [ validate-integer-id "id" value annotation from-object ] >>init + [ validate-integer-id "id" value lookup-annotation from-object ] >>init [ "contents" value "text/plain" ] >>display ; : ( -- action ) @@ -235,7 +235,7 @@ M: annotation entity-url [ { { "id" [ v-number ] } } validate-params ] >>validate [ - f "id" value annotation + f "id" value lookup-annotation [ delete-tuples ] [ parent>> paste-url ] bi