Skip to content

Commit

Permalink
sdsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Chinaniu committed Feb 1, 2024
1 parent f820a81 commit 4deecf8
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions packages/ui/src/store/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ export const gridSpacing = 3
export const drawerWidth = 260
export const appDrawerWidth = 320
export const maxScroll = 100000
export const baseURL = 'http://localhost:3100'
// process.env.NODE_ENV === 'production' ? window.location.origin : window.location.origin.replace(':8080', ':3000')
// export const baseURL = 'http://localhost:3100'
export const baseURL = process.env.NODE_ENV === 'production' ? window.location.origin : window.location.origin.replace(':8080', ':3000')
export const createdBy = document.cookie
.split('; ')
.find((row) => row.startsWith('LOWCODER_CE_SELFHOST_TOKEN='))
.find((row) => row.startsWith('Flowise='))
.split('=')[1]
.split(':')[2]
// export const createdBy = '65536f412886657aeb845dc9'
// export const orgId = '65536f422886657aeb845dca'
export const orgId = document.cookie
.split('; ')
.find((row) => row.startsWith('LOWCODER_CE_SELFHOST_TOKEN='))
.find((row) => row.startsWith('Flowise='))
.split('=')[1]
.split(':')[4]

Expand Down
60 changes: 30 additions & 30 deletions packages/ui/src/utils/GetUsersArr.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
import axios from 'axios'
// import { createdBy, orgId } from 'store/constant'
// const BaseURL = '192.168.31.109'
// const PORT = 8080
// const url = `http://${BaseURL}:${PORT}/api/users/flowIse/${createdBy}/${orgId}`

// export function getUsersArray() {
// return axios.get(url).then((res) => {
// let Data = res.data.data
// let orgId = Object.keys(Data)[0]
// let userIdArr = Object.values(Data)[0]
// return {
// orgId,
// userIdArr
// }
// })
// }
import { createdBy, orgId } from 'store/constant'
const BaseURL = 'localhost'
const PORT = 8080
const url = `http://${BaseURL}:${PORT}/api/users/flowIse/${createdBy}/${orgId}`

export function getUsersArray() {
return axios.get('http://localhost:3100/api/v1/ip').then(() => {
return axios.get(url).then((res) => {
let Data = res.data.data
let orgId = Object.keys(Data)[0]
let userIdArr = Object.values(Data)[0]
return {
orgId: '65536f422886657aeb845dca',
userIdArr: [
'65880ad733e3d01588e55ded',
'65536f412886657aeb845dc9',
'655afbf6a86fa408231fa9ab',
'658161561b9641349c6cc9a0',
'6559b39d5c3dcd549c8a0619',
'6576c47847b11e3155938b94',
'658265c79d210324ab9d4abb',
'655994d25c3dcd549c8a05c4',
'6588407329a7b000ccaee7b8',
'6588f8c054f31c775d0b499b'
]
orgId,
userIdArr
}
})
}

// export function getUsersArray() {
// return axios.get('http://localhost:3100/api/v1/ip').then(() => {
// return {
// orgId: '65536f422886657aeb845dca',
// userIdArr: [
// '65880ad733e3d01588e55ded',
// '65536f412886657aeb845dc9',
// '655afbf6a86fa408231fa9ab',
// '658161561b9641349c6cc9a0',
// '6559b39d5c3dcd549c8a0619',
// '6576c47847b11e3155938b94',
// '658265c79d210324ab9d4abb',
// '655994d25c3dcd549c8a05c4',
// '6588407329a7b000ccaee7b8',
// '6588f8c054f31c775d0b499b'
// ]
// }
// })
// }

0 comments on commit 4deecf8

Please sign in to comment.