generated from tpl/purs
fix: mdoels
This commit is contained in:
parent
d4b937d0f6
commit
cfd23aa00b
@ -7,6 +7,7 @@ package:
|
|||||||
- exceptions
|
- exceptions
|
||||||
- fetch
|
- fetch
|
||||||
- foreign-object
|
- foreign-object
|
||||||
|
- maybe
|
||||||
- mmorph
|
- mmorph
|
||||||
- newtype
|
- newtype
|
||||||
- node-buffer
|
- node-buffer
|
||||||
@ -52,7 +53,7 @@ workspace:
|
|||||||
- url
|
- url
|
||||||
url:
|
url:
|
||||||
git: 'https://git.orionkindel.com/thunderstrike/purescript-url-immutable.git'
|
git: 'https://git.orionkindel.com/thunderstrike/purescript-url-immutable.git'
|
||||||
ref: 'dbfa3b6'
|
ref: '555d55a'
|
||||||
dependencies:
|
dependencies:
|
||||||
- arrays
|
- arrays
|
||||||
- effect
|
- effect
|
||||||
|
@ -3,6 +3,8 @@ module Gitea.Error where
|
|||||||
import Prelude
|
import Prelude
|
||||||
|
|
||||||
import Control.Monad.Error.Class (class MonadThrow, throwError)
|
import Control.Monad.Error.Class (class MonadThrow, throwError)
|
||||||
|
import Data.Generic.Rep (class Generic)
|
||||||
|
import Data.Show.Generic (genericShow)
|
||||||
import Effect.Aff.Class (class MonadAff)
|
import Effect.Aff.Class (class MonadAff)
|
||||||
import HTTP.Response as HTTP
|
import HTTP.Response as HTTP
|
||||||
import HTTP.Response as HTTP.Rep
|
import HTTP.Response as HTTP.Rep
|
||||||
@ -13,6 +15,12 @@ data Error
|
|||||||
| ENotFound
|
| ENotFound
|
||||||
| EValidation { message :: String, url :: String }
|
| EValidation { message :: String, url :: String }
|
||||||
|
|
||||||
|
derive instance Generic Error _
|
||||||
|
instance Show Error where
|
||||||
|
show = genericShow
|
||||||
|
|
||||||
|
derive instance Eq Error
|
||||||
|
|
||||||
guardStatusOk :: forall m. MonadThrow Error m => MonadAff m => HTTP.Response -> m Unit
|
guardStatusOk :: forall m. MonadThrow Error m => MonadAff m => HTTP.Response -> m Unit
|
||||||
guardStatusOk rep = do
|
guardStatusOk rep = do
|
||||||
status <- HTTP.Rep.status rep
|
status <- HTTP.Rep.status rep
|
||||||
|
@ -2,6 +2,7 @@ module Gitea.Types where
|
|||||||
|
|
||||||
import Prelude
|
import Prelude
|
||||||
|
|
||||||
|
import Data.Maybe (Maybe)
|
||||||
import Data.Newtype (class Newtype)
|
import Data.Newtype (class Newtype)
|
||||||
import Foreign.Object (Object)
|
import Foreign.Object (Object)
|
||||||
import Simple.JSON (class ReadForeign, class WriteForeign)
|
import Simple.JSON (class ReadForeign, class WriteForeign)
|
||||||
@ -267,7 +268,7 @@ type RepoGiteaSettingsMutable r =
|
|||||||
|
|
||||||
type RepoSectionGiteaStatsMutable r =
|
type RepoSectionGiteaStatsMutable r =
|
||||||
( "template" :: Boolean
|
( "template" :: Boolean
|
||||||
, "external_wiki" :: RepoExternalWiki
|
, "external_wiki" :: Maybe RepoExternalWiki
|
||||||
| r
|
| r
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -280,7 +281,7 @@ type RepoSectionGiteaStatsImmutable r =
|
|||||||
, "watchers_count" :: Int
|
, "watchers_count" :: Int
|
||||||
, "fork" :: Boolean
|
, "fork" :: Boolean
|
||||||
, "forks_count" :: Int
|
, "forks_count" :: Int
|
||||||
, "repo_transfer" :: RepoTransfer
|
, "repo_transfer" :: Maybe RepoTransfer
|
||||||
| r
|
| r
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -311,8 +312,8 @@ type RepoSectionStatsImmutable r =
|
|||||||
)
|
)
|
||||||
|
|
||||||
type RepoSectionTrackerMutable r =
|
type RepoSectionTrackerMutable r =
|
||||||
( "external_tracker" :: RepoExternalTracker
|
( "external_tracker" :: Maybe RepoExternalTracker
|
||||||
, "internal_tracker" :: RepoInternalTracker
|
, "internal_tracker" :: Maybe RepoInternalTracker
|
||||||
| r
|
| r
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -370,7 +371,7 @@ type Commit =
|
|||||||
, "removed" :: Array String
|
, "removed" :: Array String
|
||||||
, "timestamp" :: String
|
, "timestamp" :: String
|
||||||
, "url" :: String
|
, "url" :: String
|
||||||
, "verification" :: CommitVerification
|
, "verification" :: Maybe CommitVerification
|
||||||
}
|
}
|
||||||
|
|
||||||
type Branch =
|
type Branch =
|
||||||
|
Loading…
Reference in New Issue
Block a user