clean: ultimately, we're not implementing a reset
This commit is contained in:
@@ -13,7 +13,6 @@ pub type StorageMsg {
|
|||||||
CreatePaste(key: String, content: String, reply: process.Subject(Bool))
|
CreatePaste(key: String, content: String, reply: process.Subject(Bool))
|
||||||
GetPaste(key: String, reply: process.Subject(Option(String)))
|
GetPaste(key: String, reply: process.Subject(Option(String)))
|
||||||
CheckRateLimit(ip: String, reply: process.Subject(Bool))
|
CheckRateLimit(ip: String, reply: process.Subject(Bool))
|
||||||
ResetRateLimits
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn lookup_paste(state: StorageState, key: String) -> Option(String) {
|
fn lookup_paste(state: StorageState, key: String) -> Option(String) {
|
||||||
@@ -55,9 +54,6 @@ pub fn handle_message(state: StorageState, msg: StorageMsg) {
|
|||||||
process.send(reply, allowed)
|
process.send(reply, allowed)
|
||||||
actor.continue(StorageState(state.pastes, new_limits))
|
actor.continue(StorageState(state.pastes, new_limits))
|
||||||
}
|
}
|
||||||
ResetRateLimits -> {
|
|
||||||
actor.continue(StorageState(state.pastes, dict.new()))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user