You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let res = builder.body(program_bytes).send().await?;
161
161
if res.status() == StatusCode::UNAUTHORIZED && !anon_identity {
162
162
// If we're not in the `anon_identity` case, then we have already forced the user to log in above (using `get_auth_header`), so this should be safe to unwrap.
163
-
let token = config.spacetimedb_token().unwrap();
164
-
let identity = decode_identity(token)?;
163
+
let token = config.spacetimedb_token(server,true).unwrap();
anyhow::bail!("You need to be logged in as the owner of {name} to publish to {name}",);
193
193
}
194
194
// If we're not in the `anon_identity` case, then we have already forced the user to log in above (using `get_auth_header`), so this should be safe to unwrap.
195
-
let token = config.spacetimedb_token().unwrap();
196
-
let identity = decode_identity(token)?;
195
+
let token = config.spacetimedb_token(server,true).unwrap();
196
+
let identity = decode_identity(&token)?;
197
197
//TODO(jdetter): Have a nice name generator here, instead of using some abstract characters
198
198
// we should perhaps generate fun names like 'green-fire-dragon' instead
199
199
let suggested_tld:String = identity.chars().take(12).collect();
0 commit comments