mirror of
https://github.com/caprover/caprover
synced 2026-05-03 10:10:29 +00:00
Unify the definiton of handler resp
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
export interface BaseHandlerResult {
|
||||
message: string
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import DataStore from '../../../datastore/DataStore'
|
||||
import { ProjectDefinition } from '../../../models/ProjectDefinition'
|
||||
import Logger from '../../../utils/Logger'
|
||||
import DataStore from '../../datastore/DataStore'
|
||||
import { ProjectDefinition } from '../../models/ProjectDefinition'
|
||||
import Logger from '../../utils/Logger'
|
||||
import { BaseHandlerResult } from '../BaseHandlerResult'
|
||||
|
||||
export interface RegisterProjectParams {
|
||||
name: string
|
||||
@@ -9,12 +10,8 @@ export interface RegisterProjectParams {
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface BaseHandlerResult {
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface RegisterProjectResult extends BaseHandlerResult {
|
||||
data?: ProjectDefinition
|
||||
data: ProjectDefinition
|
||||
}
|
||||
|
||||
export async function registerProject(
|
||||
|
||||
@@ -4,6 +4,8 @@ import ServiceManager from '../../../../user/ServiceManager'
|
||||
import CaptainConstants from '../../../../utils/CaptainConstants'
|
||||
import Logger from '../../../../utils/Logger'
|
||||
|
||||
import { BaseHandlerResult } from '../../../BaseHandlerResult'
|
||||
|
||||
export interface RegisterAppDefinitionParams {
|
||||
appName: string
|
||||
projectId: string
|
||||
@@ -11,10 +13,6 @@ export interface RegisterAppDefinitionParams {
|
||||
isDetachedBuild: boolean
|
||||
}
|
||||
|
||||
export interface BaseHandlerResult {
|
||||
message: string
|
||||
}
|
||||
|
||||
export async function registerAppDefinition(
|
||||
params: RegisterAppDefinitionParams,
|
||||
dataStore: DataStore,
|
||||
|
||||
Reference in New Issue
Block a user