Simplify direction parsing
diff --git a/cmd/termmapper/main.go b/cmd/termmapper/main.go
index 4b29825..d8ff609 100644
--- a/cmd/termmapper/main.go
+++ b/cmd/termmapper/main.go
@@ -142,9 +142,17 @@
 			})
 		}
 
+		// Parse direction
+		direction, err := mapper.ParseDirection(dir)
+		if err != nil {
+			return c.Status(fiber.StatusBadRequest).JSON(fiber.Map{
+				"error": err.Error(),
+			})
+		}
+
 		// Apply mappings
 		result, err := m.ApplyMappings(mapID, mapper.MappingOptions{
-			Direction: mapper.Direction(dir),
+			Direction: direction,
 			FoundryA:  foundryA,
 			FoundryB:  foundryB,
 			LayerA:    layerA,