This repository was archived by the owner on Jan 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 13
13
<script type =" text/javascript" src =" /scripts/bootstrap.min.js" ></script >
14
14
<script type =" text/javascript" src =" /scripts/magicsuggest.js" ></script >
15
15
<script type =" text/javascript" >
16
+ var jwtCookieName = " @ApplicationServer.JWT_V3_COOKIE_KEY@" ;
16
17
var jQuery_1_11_1 = $ .noConflict (true );
17
18
var member_api_url = " @memberSearchApiUrl@" ;
18
19
var group_member_api_url = " @groupMemberSearchApiUrl@" ;
Original file line number Diff line number Diff line change @@ -310,6 +310,9 @@ $(document).ready(function (e) {
310
310
dataType : 'json' ,
311
311
contentType : 'application/json; charset=utf-8' ,
312
312
async : false ,
313
+ beforeSend : function ( xhr ) {
314
+ xhr . setRequestHeader ( "Authorization" , "Bearer " + $ . cookie ( jwtCookieName ) ) ;
315
+ } ,
313
316
success : function ( result ) {
314
317
if ( typeof ( result [ 'result' ] ) !== 'undefined' ) {
315
318
$ . each ( result [ 'result' ] [ 'content' ] , function ( index , member ) {
Original file line number Diff line number Diff line change @@ -299,6 +299,9 @@ $(document).ready(function() {
299
299
dataType : 'json' ,
300
300
contentType : 'application/json; charset=utf-8' ,
301
301
async : false ,
302
+ beforeSend : function ( xhr ) {
303
+ xhr . setRequestHeader ( "Authorization" , "Bearer " + $ . cookie ( jwtCookieName ) ) ;
304
+ } ,
302
305
success : function ( jsonResult ) {
303
306
if ( jQuery_1_11_1 ( "#groups" ) . magicSuggest ( ) . getValue ( ) . length > 0 ) {
304
307
handleJsonResult ( jsonResult , function ( result ) {
You can’t perform that action at this time.
0 commit comments