Skip to content

Commit

Permalink
fix: webhook match go struct instead of syncer
Browse files Browse the repository at this point in the history
* Previous version was copied as-in from the
    Syncer interface, instead of the Webhook
    go struct (see https://github.com/casdoor/casdoor/blob/master/object/webhook.go#L24).
  • Loading branch information
elierotenberg committed May 21, 2024
1 parent 02c17eb commit 5544d42
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions src/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { TableColumn } from './syncer'
import { AxiosResponse } from 'axios'
import { Config } from './config'
import Request from './request'

// Webhook has same definition as https://github.com/casdoor/casdoor/blob/master/object/webhook.go#L29
export interface Webhook {
owner: string
name: string
createdTime: string

organization: string
type?: string

host?: string
port?: number
user?: string
password?: string
databaseType?: string
database?: string
table?: string
tablePrimaryKey?: string
tableColumns?: TableColumn[]
affiliationTable?: string
avatarBaseUrl?: string
errorText?: string
syncInterval?: number
isReadOnly?: boolean
createdTime?: string

organization?: string

url?: string
method?: string
contentType?: string
headers?: { name?: string; value?: string }[]
events?: string[]
isUserExtended?: boolean
singleOrgOnly?: boolean
isEnabled?: boolean

// Ormer *Ormer `xorm:"-" json:"-"`
Expand Down

0 comments on commit 5544d42

Please sign in to comment.