Skip to content

Commit

Permalink
use update instead of query for get_messages method
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico authored and Federico committed Aug 31, 2022
1 parent b128146 commit a3f1962
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/ic/src/tera/src/api/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn remove_messages(messages: Vec<OutgoingMessagePair>) -> RemoveMessagesResponse
STATE.with(|s| RemoveMessagesResponse(s.remove_messages(messages)))
}

#[query(name = "get_messages", guard = "is_authorized")]
#[update(name = "get_messages", guard = "is_authorized")]
#[candid_method(query, rename = "get_messages")]
fn get_messages() -> Vec<OutgoingMessagePair> {
STATE.with(|s| s.get_messages())
Expand Down

0 comments on commit a3f1962

Please sign in to comment.