diff options
| author | Austin Hellyer <[email protected]> | 2017-01-20 15:57:21 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2017-01-20 15:57:21 -0800 |
| commit | 38db32e2cbb9dc8504e0dfbc2366b17596836da0 (patch) | |
| tree | 5a3b46b45fc2fe3ee6f375062dd2a339424cab44 | |
| parent | Make a single POST on guild role create (diff) | |
| download | serenity-38db32e2cbb9dc8504e0dfbc2366b17596836da0.tar.xz serenity-38db32e2cbb9dc8504e0dfbc2366b17596836da0.zip | |
Fix application decoding w/ rpc_origins
rpc_origins is no longer sent, so fallback to an empty Vec if it's
not present.
| -rw-r--r-- | build.rs | 5 | ||||
| -rw-r--r-- | definitions/structs/current_application_info.yml | 1 |
2 files changed, 6 insertions, 0 deletions
@@ -390,6 +390,11 @@ impl {0} {{ format!(r#"try!(remove(&mut map, "{}").and_then(into_string))"#, field_name) }, + ("string", false, true, Some(def), None, None, None) => { + format!(r#"try!(opt(&mut map, "{}", |v| decode_array(v, into_string))).unwrap_or({})"#, + field_name, + def) + }, ("string", false, true, None, None, None, None) => { format!(r#"try!(remove(&mut map, "{}").and_then(|v| decode_array(v, into_string)))"#, field_name) diff --git a/definitions/structs/current_application_info.yml b/definitions/structs/current_application_info.yml index 923518b..cbf338d 100644 --- a/definitions/structs/current_application_info.yml +++ b/definitions/structs/current_application_info.yml @@ -15,4 +15,5 @@ fields: type: User - name: rpc_origins array: true + default: Vec::default() type: string |