mirror of
https://github.com/langgenius/dify.git
synced 2026-07-22 03:08:33 +08:00
9 lines
361 B
TypeScript
9 lines
361 B
TypeScript
import type { Environment } from '@dify/contracts/enterprise/types.gen'
|
|
|
|
export function environmentMatchesIdentifier(environment: Environment, identifier: string) {
|
|
const normalizedIdentifier = identifier.trim()
|
|
if (!normalizedIdentifier) return false
|
|
|
|
return environment.id === normalizedIdentifier || environment.displayName === normalizedIdentifier
|
|
}
|