Merge branch 'develop'
This commit is contained in:
commit
c402000f12
3 changed files with 9 additions and 2 deletions
|
|
@ -109,6 +109,8 @@ export const TicketDetail: FC<TicketDetailProps> = ({ id }) => {
|
||||||
}
|
}
|
||||||
model={{
|
model={{
|
||||||
message: article.bodyWithUrls,
|
message: article.bodyWithUrls,
|
||||||
|
type:
|
||||||
|
article.contentType === "text/html" ? "html" : "text",
|
||||||
sentTime: article.updated_at,
|
sentTime: article.updated_at,
|
||||||
sender: article.from,
|
sender: article.from,
|
||||||
direction:
|
direction:
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { gql } from 'graphql-request';
|
import { gql } from "graphql-request";
|
||||||
|
|
||||||
export const getTicketArticlesQuery = gql`
|
export const getTicketArticlesQuery = gql`
|
||||||
query getTicketArticles($ticketId: ID!) {
|
query getTicketArticles($ticketId: ID!) {
|
||||||
|
|
@ -7,6 +7,7 @@ query getTicketArticles($ticketId: ID!) {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
bodyWithUrls
|
bodyWithUrls
|
||||||
|
contentType
|
||||||
internal
|
internal
|
||||||
type {
|
type {
|
||||||
name
|
name
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,11 @@ const rewriteURL = (
|
||||||
destinationBaseURL: string,
|
destinationBaseURL: string,
|
||||||
headers: any = {},
|
headers: any = {},
|
||||||
) => {
|
) => {
|
||||||
const destinationURL = request.url.replace(originBaseURL, destinationBaseURL);
|
let path = request.url.replace(originBaseURL, "");
|
||||||
|
if (path.startsWith("/")) {
|
||||||
|
path = path.slice(1);
|
||||||
|
}
|
||||||
|
const destinationURL = `${destinationBaseURL}/${path}`;
|
||||||
console.log(`Rewriting ${request.url} to ${destinationURL}`);
|
console.log(`Rewriting ${request.url} to ${destinationURL}`);
|
||||||
const requestHeaders = new Headers(request.headers);
|
const requestHeaders = new Headers(request.headers);
|
||||||
requestHeaders.delete("x-forwarded-user");
|
requestHeaders.delete("x-forwarded-user");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue