If user container doesn't exist, use shared container
This commit is contained in:
parent
6448642477
commit
8ad882d5ab
@ -383,7 +383,13 @@ module RemoteStorage
|
|||||||
end
|
end
|
||||||
|
|
||||||
def container_url_for(user)
|
def container_url_for(user)
|
||||||
"#{base_url}/#{container_for(user)}"
|
user_container_url = "#{base_url}/#{container_for(user)}"
|
||||||
|
res = do_head_request(user_container_url)
|
||||||
|
# User before container migration
|
||||||
|
return user_container_url if res.status == 200
|
||||||
|
rescue RestClient::ResourceNotFound
|
||||||
|
# User after container migration
|
||||||
|
"#{base_url}/rs:documents:#{settings.environment.to_s}/#{user}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def url_for_key(user, directory, key)
|
def url_for_key(user, directory, key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user