Skip to content

Commit

Permalink
fix bug, remove shared scope by tenantId.
Browse files Browse the repository at this point in the history
  • Loading branch information
dushaniw committed May 12, 2020
1 parent f079ddf commit 4474710
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14696,12 +14696,13 @@ public String addSharedScope(Scope scope, String tenantDomain) throws APIManagem
*/
public void deleteSharedScope(String scopeName, String tenantDomain) throws APIManagementException {

int tenantId = APIUtil.getTenantIdFromTenantDomain(tenantDomain);
try (Connection connection = APIMgtDBUtil.getConnection();
PreparedStatement statement = connection.prepareStatement(SQLConstants.DELETE_SHARED_SCOPE)) {
try {
connection.setAutoCommit(false);
statement.setString(1, scopeName);
statement.setString(2, tenantDomain);
statement.setInt(2, tenantId);
statement.executeUpdate();
connection.commit();
} catch (SQLException e) {
Expand Down

0 comments on commit 4474710

Please sign in to comment.