Skip to content

Commit

Permalink
Merge branch 'rewrite' into feature/web-server-v2
Browse files Browse the repository at this point in the history
# Conflicts:
#	pubspec.yaml
  • Loading branch information
l7ssha committed Nov 18, 2024
2 parents 201d2a4 + 4575cc0 commit caa5b37
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 4.9.1
- Upgrade migent
- Fix kavita exception message
- Validate json before saving to db

## 4.9.0
- feature: Query builder (#38)
- feature: Kavita (#39)
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.9'
services:
running_on_dart:
image: ghcr.io/nyxx-discord/running_on_dart:4.9.0
image: ghcr.io/nyxx-discord/running_on_dart:4.9.1
container_name: running_on_dart
env_file:
- .env
Expand Down
16 changes: 13 additions & 3 deletions lib/src/commands/feature_settings.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:convert';

import 'package:collection/collection.dart';
import 'package:injector/injector.dart';
import 'package:nyxx/nyxx.dart';
Expand Down Expand Up @@ -27,8 +29,16 @@ final featureSettings = ChatGroup(
description: 'The setting `${setting.name}` requires the `data` argument to be specified.'
' Please re-run the command and specify the additional data required, or contact a developer for more details.');

await context.respond(MessageBuilder(embeds: [embed]));
return;
return context.respond(MessageBuilder(embeds: [embed]));
}

if (setting.type == DataType.json) {
try {
final decodedData = jsonDecode(data!);
data = jsonEncode(decodedData);
} on FormatException {
return context.respond(MessageBuilder(content: 'Setting requires valid json as data'));
}
}

final featureSetting = FeatureSetting(
Expand All @@ -41,7 +51,7 @@ final featureSettings = ChatGroup(

await Injector.appInstance.get<FeatureSettingsModule>().enable(featureSetting);

await context.respond(MessageBuilder(content: 'Successfully enabled setting!'));
return context.respond(MessageBuilder(content: 'Successfully enabled setting!'));
}),
),
ChatCommand(
Expand Down
2 changes: 1 addition & 1 deletion lib/src/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:io';

import 'package:nyxx/nyxx.dart';

String get version => '4.9.0';
String get version => '4.9.1';

/// Get a [String] from an environment variable, throwing an exception if it is not set.
///
Expand Down

0 comments on commit caa5b37

Please sign in to comment.