File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/firestore/src/remote Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -70,12 +70,14 @@ export abstract class RestConnection implements Connection {
70
70
constructor ( private readonly databaseInfo : DatabaseInfo ) {
71
71
this . databaseId = databaseInfo . databaseId ;
72
72
const proto = databaseInfo . ssl ? 'https' : 'http' ;
73
+ const projectId = encodeURIComponent ( this . databaseId . projectId ) ;
74
+ const databaseId = encodeURIComponent ( this . databaseId . database ) ;
73
75
this . baseUrl = proto + '://' + databaseInfo . host ;
74
- this . databasePath = `projects/${ databaseInfo . databaseId . projectId } /databases/${ databaseInfo . databaseId . database } ` ;
76
+ this . databasePath = `projects/${ projectId } /databases/${ databaseId } ` ;
75
77
this . requestParams =
76
78
this . databaseId . database === DEFAULT_DATABASE_NAME
77
- ? `project_id=${ this . databaseId . projectId } `
78
- : `project_id=${ this . databaseId . projectId } &database_id=${ this . databaseId . database } ` ;
79
+ ? `project_id=${ projectId } `
80
+ : `project_id=${ projectId } &database_id=${ databaseId } ` ;
79
81
}
80
82
81
83
invokeRPC < Req , Resp > (
You can’t perform that action at this time.
0 commit comments