แก้ env
This commit is contained in:
parent
5859a46666
commit
360bfe22a8
3 changed files with 25 additions and 4 deletions
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
|
@ -9,8 +9,8 @@ env:
|
||||||
REGISTRY: docker.frappet.com
|
REGISTRY: docker.frappet.com
|
||||||
IMAGE_NAME: ehr/bma-ehr-org-service
|
IMAGE_NAME: ehr/bma-ehr-org-service
|
||||||
DEPLOY_HOST: frappet.com
|
DEPLOY_HOST: frappet.com
|
||||||
COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
# COMPOSE_PATH: /home/frappet/docker/bma-ehr
|
||||||
# COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-org
|
COMPOSE_PATH: /home/frappet/docker/bma/bma-ehr-org
|
||||||
jobs:
|
jobs:
|
||||||
# act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
# act workflow_dispatch -W .github/workflows/release.yaml --input IMAGE_VER=latest -s DOCKER_USER=admin -s DOCKER_PASS=FPTadmin2357 -s SSH_PASSWORD=FPTadmin2357
|
||||||
release-test:
|
release-test:
|
||||||
|
|
|
||||||
|
|
@ -2973,6 +2973,27 @@ export class ProfileController extends Controller {
|
||||||
return new HttpSuccess(_profile);
|
return new HttpSuccess(_profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* API ข้อมูลทะเบียนประวัติตาม keycloakid
|
||||||
|
*
|
||||||
|
* @summary ORG_065 - ข้อมูลทะเบียนประวัติตาม keycloakid (ADMIN) #70
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Get("keycloakid/position/{id}")
|
||||||
|
async getProfileByKeycloakid(
|
||||||
|
@Request() request: { user: Record<string, any> },
|
||||||
|
@Path() id: string,
|
||||||
|
) {
|
||||||
|
const profile = await this.profileRepo.findOne({
|
||||||
|
where: { keycloak: id },
|
||||||
|
select: ["id"],
|
||||||
|
});
|
||||||
|
if (!profile) {
|
||||||
|
throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูลบุคคลนี้ในระบบ");
|
||||||
|
}
|
||||||
|
return new HttpSuccess(profile);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API ข้อมูลทะเบียนประวัติตาม citizenId
|
* API ข้อมูลทะเบียนประวัติตาม citizenId
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class CallAPI {
|
||||||
//Get
|
//Get
|
||||||
public async GetData(request: any, @Path() path: any) {
|
public async GetData(request: any, @Path() path: any) {
|
||||||
const token = request.headers.authorization;
|
const token = request.headers.authorization;
|
||||||
const url = process.env.API + path;
|
const url = process.env.API_URL + path;
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(url, {
|
const response = await axios.get(url, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -33,7 +33,7 @@ class CallAPI {
|
||||||
//Post
|
//Post
|
||||||
public async PostData(request: any, @Path() path: any, sendData: any) {
|
public async PostData(request: any, @Path() path: any, sendData: any) {
|
||||||
const token = request.headers.authorization;
|
const token = request.headers.authorization;
|
||||||
const url = process.env.API + path;
|
const url = process.env.API_URL + path;
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(url, sendData, {
|
const response = await axios.post(url, sendData, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue