cli: insert -> add

This commit is contained in:
2024-10-11 15:45:24 +02:00
parent 3ff98358c0
commit 33ecbd5734

View File

@@ -33,7 +33,7 @@ cmd_ =
O.progDesc "Manage content collections"
]
data CollectionCmd = CollectionInsert
data CollectionCmd = CollectionAdd
{ filePath :: CollectionPath
}
@@ -59,13 +59,13 @@ instance Show CollectionPath where
collectionCmd :: O.Parser Cmd
collectionCmd =
fmap Collection . O.hsubparser . mconcat $
[ O.command "insert" . O.info collectionInsertCmd $
O.progDesc "Insert an entity"
[ O.command "add" . O.info collectionAddCmd $
O.progDesc "Add an entity"
]
collectionInsertCmd :: O.Parser CollectionCmd
collectionInsertCmd =
CollectionInsert
collectionAddCmd :: O.Parser CollectionCmd
collectionAddCmd =
CollectionAdd
<$> collectionPathArg
collectionPathArg :: O.Parser CollectionPath
@@ -78,7 +78,7 @@ main = do
Args
{ cmd =
Collection
CollectionInsert
CollectionAdd
{ filePath = CollectionPath {collectionName, fileName}
}
} ->