mirror of
https://github.com/pawelmalak/flame.git
synced 2026-03-09 22:13:12 +08:00
Added auth headers to api requests
This commit is contained in:
@@ -51,6 +51,7 @@ export const AuthForm = (): JSX.Element => {
|
||||
id="password"
|
||||
name="password"
|
||||
placeholder="••••••"
|
||||
autoComplete="current-password"
|
||||
value={formData.password}
|
||||
onChange={(e) =>
|
||||
setFormData({ ...formData, password: e.target.value })
|
||||
|
||||
@@ -9,8 +9,9 @@ import { actionCreators } from '../../../store';
|
||||
// Typescript
|
||||
import { ApiResponse } from '../../../interfaces';
|
||||
|
||||
// UI
|
||||
// Other
|
||||
import { InputGroup, Button } from '../../UI';
|
||||
import { applyAuth } from '../../../utility';
|
||||
|
||||
export const StyleSettings = (): JSX.Element => {
|
||||
const dispatch = useDispatch();
|
||||
@@ -34,7 +35,11 @@ export const StyleSettings = (): JSX.Element => {
|
||||
e.preventDefault();
|
||||
|
||||
axios
|
||||
.put<ApiResponse<{}>>('/api/config/0/css', { styles: customStyles })
|
||||
.put<ApiResponse<{}>>(
|
||||
'/api/config/0/css',
|
||||
{ styles: customStyles },
|
||||
{ headers: applyAuth() }
|
||||
)
|
||||
.then(() => {
|
||||
createNotification({
|
||||
title: 'Success',
|
||||
|
||||
Reference in New Issue
Block a user