mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-29 22:02:46 +00:00
Post merge fixes
This commit is contained in:
@@ -3,9 +3,9 @@ import React, { useEffect, useState } from 'react';
|
||||
const BrewUtils = require('./brewUtils/brewUtils.jsx');
|
||||
const NotificationUtils = require('./notificationUtils/notificationUtils.jsx');
|
||||
import AuthorUtils from './authorUtils/authorUtils.jsx';
|
||||
const LockTools = require('./lockTools/lockTools.jsx');
|
||||
import LockTools from './lockTools/lockTools.jsx';
|
||||
|
||||
const tabGroups = ['brew', 'notifications', 'authors'];
|
||||
const tabGroups = ['brew', 'notifications', 'authors', 'locks'];
|
||||
|
||||
const Admin = ()=>{
|
||||
const [currentTab, setCurrentTab] = useState('brew');
|
||||
@@ -41,7 +41,7 @@ const Admin = ()=>{
|
||||
{currentTab === 'brew' && <BrewUtils />}
|
||||
{currentTab === 'notifications' && <NotificationUtils />}
|
||||
{currentTab === 'authors' && <AuthorUtils />}
|
||||
{currentTab === 'locks' && <LockTools />}
|
||||
{currentTab === 'locks' && <LockTools />}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ const React = require('react');
|
||||
const createClass = require('create-react-class');
|
||||
|
||||
// const request = require('superagent');
|
||||
const request = require('../../homebrew/utils/request-middleware.js');
|
||||
import request from '../../homebrew/utils/request-middleware.js';
|
||||
|
||||
const LockTools = createClass({
|
||||
getInitialState : function() {
|
||||
@@ -226,7 +226,7 @@ const LockTable = createClass({
|
||||
</td>;
|
||||
})}
|
||||
<td className='icon' onClick={()=>{navigator.clipboard.writeText(result.shareId.toString());}}><i className='fa-regular fa-clipboard'></i></td>
|
||||
<td className='icon'><i className='fa-regular fa-circle-right'></i></td>
|
||||
<td className='icon'><a href={`/share/${result.shareId.toString()}`} target='_blank'><i className='fa-regular fa-circle-right'></i></a></td>
|
||||
</tr>;
|
||||
})}
|
||||
</tbody>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const version = require('../../../package.json').version;
|
||||
import packageJSON from '../../../package.json' with { type: 'json' };
|
||||
import request from 'superagent';
|
||||
|
||||
|
||||
const addHeader = (request)=>request.set('Homebrewery-Version', version);
|
||||
const addHeader = (request)=>request.set('Homebrewery-Version', packageJSON.version);
|
||||
|
||||
const requestMiddleware = {
|
||||
get : (path)=>addHeader(request.get(path)),
|
||||
|
||||
@@ -305,6 +305,8 @@ router.put('/api/lock/review/remove/:id', mw.adminOnly, async (req, res)=>{
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return res.json({ status: 'ERROR', detail: `Unable to remove request for review on brew ID ${req.params.id}`, error });
|
||||
};
|
||||
});
|
||||
|
||||
// ####################### NOTIFICATIONS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user