diff --git a/lib/src/sql/value/value.rs b/lib/src/sql/value/value.rs index f5080ff1..0508f504 100644 --- a/lib/src/sql/value/value.rs +++ b/lib/src/sql/value/value.rs @@ -842,14 +842,14 @@ impl Value { // ----------------------------------- /// Fetch the record id if there is one - pub fn rid(self) -> Option { + pub fn record(self) -> Option { match self { Value::Object(mut v) => match v.remove("id") { Some(Value::Thing(v)) => Some(v), _ => None, }, Value::Array(mut v) => match v.len() { - 1 => v.remove(0).rid(), + 1 => v.remove(0).record(), _ => None, }, Value::Thing(v) => Some(v), diff --git a/src/iam/signin.rs b/src/iam/signin.rs index 7b73fb74..398fb2fb 100644 --- a/src/iam/signin.rs +++ b/src/iam/signin.rs @@ -123,7 +123,7 @@ pub async fn sc( // Compute the value with the params match kvs.compute(val, &sess, vars, opt.strict).await { // The signin value succeeded - Ok(val) => match val.rid() { + Ok(val) => match val.record() { // There is a record returned Some(rid) => { // Create the authentication key diff --git a/src/iam/signup.rs b/src/iam/signup.rs index ecf0d7fe..fef6ad4c 100644 --- a/src/iam/signup.rs +++ b/src/iam/signup.rs @@ -58,7 +58,7 @@ pub async fn sc( // Compute the value with the params match kvs.compute(val, &sess, vars, opt.strict).await { // The signin value succeeded - Ok(val) => match val.rid() { + Ok(val) => match val.record() { // There is a record returned Some(rid) => { // Create the authentication key