Remove unused backend methods & formatting
This commit is contained in:
parent
5919d9273f
commit
0b5bb711a1
@ -66,10 +66,6 @@ message DeckConfigID {
|
||||
int64 dcid = 1;
|
||||
}
|
||||
|
||||
message TagID {
|
||||
int64 tid = 1;
|
||||
}
|
||||
|
||||
// New style RPC definitions
|
||||
///////////////////////////////////////////////////////////
|
||||
|
||||
@ -144,7 +140,8 @@ service BackendService {
|
||||
|
||||
// deck config
|
||||
|
||||
rpc AddOrUpdateDeckConfigLegacy (AddOrUpdateDeckConfigLegacyIn) returns (DeckConfigID);
|
||||
rpc AddOrUpdateDeckConfigLegacy(AddOrUpdateDeckConfigLegacyIn)
|
||||
returns (DeckConfigID);
|
||||
rpc AllDeckConfigLegacy(Empty) returns (Json);
|
||||
rpc GetDeckConfigLegacy(DeckConfigID) returns (Json);
|
||||
rpc NewDeckConfigLegacy(Empty) returns (Json);
|
||||
@ -212,8 +209,6 @@ service BackendService {
|
||||
|
||||
rpc RegisterTags(RegisterTagsIn) returns (Bool);
|
||||
rpc AllTags(Empty) returns (AllTagsOut);
|
||||
rpc GetTag (String) returns (Tag);
|
||||
rpc UpdateTag (Tag) returns (Bool);
|
||||
rpc SetTagCollapsed(SetTagCollapsedIn) returns (Bool);
|
||||
rpc ClearTag(String) returns (Bool);
|
||||
rpc TagTree(Empty) returns (TagTreeNode);
|
||||
|
@ -1300,23 +1300,6 @@ impl BackendService for Backend {
|
||||
Ok(pb::AllTagsOut { tags })
|
||||
}
|
||||
|
||||
fn get_tag(&self, name: pb::String) -> BackendResult<pb::Tag> {
|
||||
self.with_col(|col| {
|
||||
if let Some(tag) = col.storage.get_tag(name.val.as_str())? {
|
||||
Ok(tag.into())
|
||||
} else {
|
||||
Err(AnkiError::NotFound)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn update_tag(&self, tag: pb::Tag) -> BackendResult<pb::Bool> {
|
||||
self.with_col(|col| {
|
||||
col.update_tag(&tag.into())?;
|
||||
Ok(pb::Bool { val: true })
|
||||
})
|
||||
}
|
||||
|
||||
fn set_tag_collapsed(&self, input: pb::SetTagCollapsedIn) -> BackendResult<pb::Bool> {
|
||||
self.with_col(|col| {
|
||||
let name = &input.name;
|
||||
|
Loading…
Reference in New Issue
Block a user