fix(web): fix Theme Custom CSS endpoint requiring the user to be logged in as the server admin (#4633)

* fix custom css requiring the user to be the admin and logged in

* move theme api to custom endpoint

* add e2e test
This commit is contained in:
Wingy
2023-10-25 15:13:05 -07:00
committed by GitHub
parent 237d1c1bf4
commit cb0e37e76e
20 changed files with 448 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ Method | HTTP request | Description
[**getServerVersion**](ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
[**getStats**](ServerInfoApi.md#getstats) | **GET** /server-info/stats |
[**getSupportedMediaTypes**](ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |
[**getTheme**](ServerInfoApi.md#gettheme) | **GET** /server-info/theme |
[**pingServer**](ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
@@ -268,6 +269,43 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getTheme**
> ServerThemeDto getTheme()
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = ServerInfoApi();
try {
final result = api_instance.getTheme();
print(result);
} catch (e) {
print('Exception when calling ServerInfoApi->getTheme: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ServerThemeDto**](ServerThemeDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **pingServer**
> ServerPingResponse pingServer()

15
mobile/openapi/doc/ServerThemeDto.md generated Normal file
View File

@@ -0,0 +1,15 @@
# openapi.model.ServerThemeDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**theme** | [**SystemConfigThemeDto**](SystemConfigThemeDto.md) | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)