From 2a8e2467db21847ccab1b686e03a3a468520724e Mon Sep 17 00:00:00 2001
From: Will Freeman
Date: Sun, 1 Jun 2025 20:49:50 -0600
Subject: [PATCH] fix compilation
---
.../main/scala/services/DynamoDBClient.scala | 77 -------------------
webapp/src/views/FOIA.vue | 19 +++--
2 files changed, 9 insertions(+), 87 deletions(-)
delete mode 100644 shotgun/src/main/scala/services/DynamoDBClient.scala
diff --git a/shotgun/src/main/scala/services/DynamoDBClient.scala b/shotgun/src/main/scala/services/DynamoDBClient.scala
deleted file mode 100644
index 85ab460..0000000
--- a/shotgun/src/main/scala/services/DynamoDBClient.scala
+++ /dev/null
@@ -1,77 +0,0 @@
-package services
-
-import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider
-import software.amazon.awssdk.regions.Region
-import software.amazon.awssdk.services.dynamodb.DynamoDbClient
-import software.amazon.awssdk.services.dynamodb.model._
-
-import scala.concurrent.{ExecutionContext, Future}
-import scala.collection.JavaConverters._
-import scala.util.Try
-
-class DynamoDBClient(region: Region = Region.US_EAST_1)(implicit ec: ExecutionContext) {
-
- // Create the base DynamoDB client
- private val dynamoDbClient = DynamoDbClient.builder()
- .region(region)
- .credentialsProvider(DefaultCredentialsProvider.create())
- .build()
-
- // Get an item using the standard client
- private def getItem(tableName: String, key: java.util.Map[String, AttributeValue]): Future[Option[java.util.Map[String, AttributeValue]]] = Future {
- val request = GetItemRequest.builder()
- .tableName(tableName)
- .key(key)
- .build()
-
- dynamoDbClient.getItem(request).item() match {
- case item if item.isEmpty => None
- case item => Some(item)
- }
- }
-
- // Get item with Scala Map instead of Java Map
- def getItem(tableName: String, key: Map[String, AttributeValue]): Future[Option[Map[String, AttributeValue]]] = {
- getItem(tableName, key.asJava).map {
- _.map(_.asScala.toMap)
- }
- }
-
- // Put an item
- def putItem(tableName: String, item: Map[String, AttributeValue]): Future[PutItemResponse] = Future {
- val request = PutItemRequest.builder()
- .tableName(tableName)
- .item(item.asJava)
- .build()
-
- dynamoDbClient.putItem(request)
- }
-
- // Delete an item
- def deleteItem(tableName: String, key: Map[String, AttributeValue]): Future[DeleteItemResponse] = Future {
- val request = DeleteItemRequest.builder()
- .tableName(tableName)
- .key(key.asJava)
- .build()
-
- dynamoDbClient.deleteItem(request)
- }
-
- // Scan items
- def scanItems(tableName: String): Future[List[Map[String, AttributeValue]]] = Future {
- val request = ScanRequest.builder()
- .tableName(tableName)
- .build()
-
- dynamoDbClient.scan(request)
- .items()
- .asScala
- .map(_.asScala.toMap)
- .toList
- }
-
- // Close resources
- def close(): Unit = {
- dynamoDbClient.close()
- }
-}
diff --git a/webapp/src/views/FOIA.vue b/webapp/src/views/FOIA.vue
index cb82ba4..361c9c4 100644
--- a/webapp/src/views/FOIA.vue
+++ b/webapp/src/views/FOIA.vue
@@ -14,11 +14,10 @@
Your help is crucial. Filing a public records request is easy, and your contribution will help us build a complete map of these surveillance networks. We'll even link you to several hundred examples to follow .[1]
-
-
- [1] While these examples focus on Flock Safety, the process applies to all ALPR vendors. Flock is highlighted here because it is the most widely reported ALPR vendor in the US on OpenStreetMap at the time this was written.
-
+
+ [1] While these examples focus on Flock Safety, the process applies to all ALPR vendors. Flock is highlighted here because it is the most widely reported ALPR vendor in the US on OpenStreetMap at the time this was written.
+
@@ -33,13 +32,13 @@
Browse Muckrock for examples of public records requests related to ALPRs. Use these as templates to draft your own request. Here are some common requests you can adapt:
-
- Right-of-Way Installation Permits (typically include a map of locations)
- Invoices for ALPRs (contain count of cameras)
- Contracts with ALPR vendors (show proof of usage)
- Emails discussing ALPR installations
-
+
+ Right-of-Way Installation Permits (typically include a map of locations)
+ Invoices for ALPRs (contain count of cameras)
+ Contracts with ALPR vendors (show proof of usage)
+ Emails discussing ALPR installations
+
If you need help tailoring this to your situation, appealing rejections, etc., ChatGPT is a great resource.