+9
-5
private_search_page.js
+9
-5
private_search_page.js
···
42
42
43
43
let params = new URLSearchParams(location.search);
44
44
this.mode = params.get('mode');
45
-
this.lycanMode = params.get('lycan');
45
+
let lycan = params.get('lycan');
46
46
47
-
if (this.lycanMode == 'local') {
47
+
if (lycan == 'local') {
48
48
this.localLycan = new BlueskyAPI('http://localhost:3000', false);
49
+
} else if (lycan) {
50
+
this.lycanAddress = `did:web:${lycan}#lycan`;
51
+
} else {
52
+
this.lycanAddress = 'did:web:lycan.feeds.blue#lycan';
49
53
}
50
54
}
51
55
···
136
140
return await this.localLycan.getRequest('blue.feeds.lycan.getImportStatus', { user: accountAPI.user.did });
137
141
} else {
138
142
return await accountAPI.getRequest('blue.feeds.lycan.getImportStatus', null, {
139
-
headers: { 'atproto-proxy': 'did:web:lycan.feeds.blue#lycan' }
143
+
headers: { 'atproto-proxy': this.lycanAddress }
140
144
});
141
145
}
142
146
}
···
244
248
});
245
249
} else {
246
250
await accountAPI.postRequest('blue.feeds.lycan.startImport', null, {
247
-
headers: { 'atproto-proxy': 'did:web:lycan.feeds.blue#lycan' }
251
+
headers: { 'atproto-proxy': this.lycanAddress }
248
252
});
249
253
}
250
254
···
358
362
if (cursor) params.cursor = cursor;
359
363
360
364
response = await accountAPI.getRequest('blue.feeds.lycan.searchPosts', params, {
361
-
headers: { 'atproto-proxy': 'did:web:lycan.feeds.blue#lycan' }
365
+
headers: { 'atproto-proxy': this.lycanAddress }
362
366
});
363
367
}
364
368