Skip to content

Commit

Permalink
early nanopay
Browse files Browse the repository at this point in the history
  • Loading branch information
nano2dev committed Mar 2, 2024
1 parent 67003a1 commit 30b52dc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion app/javascript/mastodon/components/status_action_bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ class StatusActionBar extends ImmutablePureComponent {

if (nano_to_name) {
api().get('/api/v1/streaming/nano_known').then(known => {

Check failure on line 156 in app/javascript/mastodon/components/status_action_bar.jsx

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 8 spaces but found 10
console.log( response.data.fields )
var name = nano_to_name.value.match(/href="([^"]*)"/)[1]

Check failure on line 157 in app/javascript/mastodon/components/status_action_bar.jsx

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 10 spaces but found 12

Check failure on line 157 in app/javascript/mastodon/components/status_action_bar.jsx

View workflow job for this annotation

GitHub Actions / lint

Missing semicolon
name = name.replace('https://', '').replace('http://', '')

Check failure on line 158 in app/javascript/mastodon/components/status_action_bar.jsx

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 10 spaces but found 16

Check failure on line 158 in app/javascript/mastodon/components/status_action_bar.jsx

View workflow job for this annotation

GitHub Actions / lint

Missing semicolon
name = name.split('/')[1]

Check failure on line 159 in app/javascript/mastodon/components/status_action_bar.jsx

View workflow job for this annotation

GitHub Actions / lint

Expected indentation of 10 spaces but found 16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ class ActionBar extends PureComponent {

if (nano_to_name) {
api().get('/api/v1/streaming/nano_known').then(known => {
console.log( response.data.fields )
var name = nano_to_name.value.match(/href="([^"]*)"/)[1]
name = name.replace('https://', '').replace('http://', '')
name = name.split('/')[1]
Expand Down
2 changes: 1 addition & 1 deletion streaming/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ const startServer = async () => {
app.get('/api/v1/streaming/nanopay', async (req, res) => {
res.writeHead(200, { 'Content-Type': 'text/javascript' });
try {
res.write(JSON.stringify( (await axios.get('https://raw.githubusercontent.com/fwd/NanoPay/master/latest.js')).data ));
res.write( (await axios.get('https://raw.githubusercontent.com/fwd/NanoPay/master/latest.js')).data );
res.end();
} catch (e) {
res.end( e.message ? e.message : e );
Expand Down

0 comments on commit 30b52dc

Please sign in to comment.