on master help sign in
removed transactions.
commitf618fed6e81ac0a9a6a14ea2b93c6b9b11ab0c7a authoriko <ilyakooo0@gmail.com> dateSat 16 Mar 2019, 13:25 (8 years ago) parentbd85558
1 file changed+8−4
denis/src/Data/Query.hs+8−4
denis/src/Data/Query.hs+8−4
@@ -309,7 +309,8 @@ getAllUsers :: StaticPQ [User]
309309getAllUsers = runQuery getAllUsersQ >>= getRows
310310
311311publishPost :: UserId -> PostCreation -> StaticPQ PostId
312−publishPost uId pc = transactionally_ $ do
312+-- publishPost uId pc = transactionally_ $ do
313+publishPost uId pc = do
313314 pId' <- manipulateParams createPostRowQ (uId, postCreationTags pc) >>= firstRow
314315 case pId' of
315316 (Just (Only pId)) -> do
@@ -318,12 +319,14 @@ publishPost uId pc = transactionally_ $ do
318319 _ -> lift $ S.throwError S.err404
319320
320321createNewChannel :: UserId -> NamedChannelCreationRequest -> StaticPQ (Maybe NamedChannelId)
321−createNewChannel uId req = transactionally_ $ do
322+-- createNewChannel uId req = transactionally_ $ do
323+createNewChannel uId req = do
322324 uIds <- verifiedUsers . toList $ namedChannelCreationRequestPeopleIds req
323325 cId <- manipulateParams createNamedChannelQ (addUserToChannelCreate uId (req {namedChannelCreationRequestPeopleIds = fromList uIds})) >>= firstRow
324326 return $ fmap fromOnly cId
325327
326328updateChannel :: UserId -> NamedChannel UserId -> StaticPQ ()
329+-- updateChannel uId req = transactionally_ $ do
327330updateChannel uId req = do
328331 uIds <- fmap fromList . verifiedUsers . toList $ namedChannelPeopleIds req
329332 _ <- getChannelForUser uId $ namedChannelId req
@@ -347,8 +350,9 @@ getAllChannels uId = fmap (map removeUserFromChannel) $
347350 runQueryParams getAllChannelsForUserQ (Only uId) >>= getRows
348351
349352deleteNamedChannel :: UserId -> NamedChannelId -> StaticPQ ()
350−deleteNamedChannel uId cId = transactionally_ $ do
351− _ <- getChannelForUser uId cId
353+-- deleteNamedChannel uId cId = transactionally_ $ do
354+deleteNamedChannel uId cId = do
355+ _ <- getChannelForUser uId cId
352356 _ <- manipulateParams deleteNamedChannelQ (Only cId)
353357 return ()
354358