mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 12:46:54 +00:00
bugfix/methodrouting: fix messages display error
This commit is contained in:
parent
4bd4da0305
commit
e5cc78d32a
@ -8,7 +8,8 @@ $(document).ready(function($) {
|
||||
bank_id_pattern = $(runner).find('textarea[name="bank_id_pattern"]').val();
|
||||
is_bank_id_exact_match = $(runner).find('.is_bank_id_exact_match').val();
|
||||
parameters = $(runner).find('textarea[name="parameters"]').val();
|
||||
|
||||
$('.runner button.forSave').attr("disabled","disabled");
|
||||
$('.runner button.forDelete').attr("disabled","disabled");
|
||||
$.post('methodrouting/save/method', {
|
||||
'method_routing_id': method_routing_id,
|
||||
'method_name': method_name,
|
||||
@ -17,18 +18,22 @@ $(document).ready(function($) {
|
||||
'is_bank_id_exact_match': is_bank_id_exact_match,
|
||||
'parameters': parameters
|
||||
}, function (response) {
|
||||
t.next().show().fadeOut(1000);
|
||||
location.reload();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.runner button.forDelete').click(function() {
|
||||
var t = $(this);
|
||||
var runner = $(this).parent().parent().parent();
|
||||
method_routing_id = $(runner).find('.method_routing_id').text();
|
||||
$('.runner button.forSave').attr("disabled","disabled");
|
||||
$('.runner button.forDelete').attr("disabled","disabled");
|
||||
$.post('methodrouting/delete/method', {
|
||||
'method_routing_id': method_routing_id
|
||||
}, function (response) {
|
||||
t.parent().parent().parent().remove();
|
||||
location.reload();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
@ -33,8 +33,6 @@ class IndexView(LoginRequiredMixin, FormView):
|
||||
if 'code' in response and response['code'] >= 400:
|
||||
error_once_only(self.request, response['message'])
|
||||
else:
|
||||
msg = 'Submit successfully!'
|
||||
messages.success(self.request, msg)
|
||||
method_routings=response['method_routings']
|
||||
except APIError as err:
|
||||
error_once_only(self.request, Exception("OBP-API server is not running or do not response properly. "
|
||||
@ -75,7 +73,6 @@ def methodrouting_save(request):
|
||||
else: # if method_routing_id not empty. we will update the current method routing ..
|
||||
urlpath = '/management/method_routings/{}'.format(method_routing_id)
|
||||
result = api.put(urlpath, payload=payload)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user