Page MenuHomeSoftware Heritage
Paste P1440

pub.dev creation date
ActivePublic

Authored by vlorentz on Aug 31 2022, 1:02 PM.
dev-dart@desktop5:~/pub-dev/app$ git diff
diff --git a/app/lib/frontend/handlers/custom_api.dart b/app/lib/frontend/handlers/custom_api.dart
index 8342cd1d..4d5bf622 100644
--- a/app/lib/frontend/handlers/custom_api.dart
+++ b/app/lib/frontend/handlers/custom_api.dart
@@ -175,6 +175,7 @@ Future<shelf.Response> apiPackagesHandler(shelf.Request request) async {
'name': version.package,
'latest': {
'version': version.version,
+ 'created': version.created!.toIso8601String(),
'pubspec': version.pubspec!.asJson,
// TODO: We should get rid of these:
diff --git a/app/test/frontend/handlers/custom_api_test.dart b/app/test/frontend/handlers/custom_api_test.dart
index e09768d6..8bc10d00 100644
--- a/app/test/frontend/handlers/custom_api_test.dart
+++ b/app/test/frontend/handlers/custom_api_test.dart
@@ -28,6 +28,7 @@ void main() {
'name': 'oxygen',
'latest': {
'version': '1.2.0',
+ 'created': isNotEmpty,
'pubspec': {
'name': 'oxygen',
'version': '1.2.0',
@@ -55,6 +56,7 @@ void main() {
'name': 'flutter_titanium',
'latest': {
'version': '1.10.0',
+ 'created': isNotEmpty,
'pubspec': {
'name': 'flutter_titanium',
'version': '1.10.0',
@@ -84,6 +86,7 @@ void main() {
'name': 'neon',
'latest': {
'version': '1.0.0',
+ 'created': isNotEmpty,
'pubspec': {
'name': 'neon',
'version': '1.0.0',