I have the following URL:
https://example.com/specialty_detail/specialty/60/Radiology-Billing-Services
but I want the URL:
https://example.com/specialty/Radiology-Billing-Services
Related
How to Remove Paginated URLs From Jekyll-sitemap ⬇
pagination:
enabled: true
per_page: 6
offset: 0
permalink: "/page/:num/"
title: ":title - page :num of :max"
limit: 0
sort_field: date
sort_reverse: true
I am using pagination v2,
I tried
paginate_path: "/blog/page/:num/"
defaults:
- scope:
path: "blog/page"
values:
sitemap: false
and
paginate_path: "/blog/:num/"
defaults:
- scope:
path: "blog"
values:
sitemap: false
etc.
As I tried all possible solutions getting from research but nothing works in my case so I suggest adding
sitemap: false
in the front matter of your
/blog/
page, this will remove all the pages generated by the paginator but this will also remove /blog/ URL so, for this, you have to make a new .md file with only
permalink: "/blog/"
and redirect this link to your main blog page such as
it may help you 👍
My Angular client application is using MSAL in order to communicate with Azure B2C and retrieve the id token, refresh token and access token. These are in my localstorage after login.
I'm also using openapi generator to generate my services for my client application. The thing is, whenever I make a call to my backend, it is resulting as a 401.
The controller:
[Authorize]
[RequiredScope("example.read")]
[HttpGet(Name = "GetJobs")]
public async Task<ActionResult<IEnumerable<JobDTO>>> Index(int pageNumber, int pageSize, string? titleDesc, string? category)
{
var owner = CheckClaimMatch(ClaimTypes.NameIdentifier);
try
{
var result = await _jobModel.GetAllJobs(pageNumber, pageSize, titleDesc, category);
return Ok(result);
} catch (Exception ex)
{
return BadRequest(ex);
}
}
And here is my (simplified) openapi configuration:
openapi: 3.0.3
info:
title: EXAMPLE REST API
description: Api for the new example application
version: 1.0.0
servers:
- url: "https://{hostname}:{port}/{basePath}/"
variables:
hostname:
default: localhost
port:
default: "7051"
basePath:
default: api
tags:
- name: Job
paths:
/Jobs:
get:
operationId: getJobs
security:
- AzureOAuth:
- example.read
tags:
- Job
parameters:
- in: query
name: titleDesc
schema:
type: string
responses:
200:
description: Returns requested page
content:
application/json:
schema:
$ref: "#/components/schemas/JobPage"
components:
securitySchemes:
AzureOAuth:
type: oauth2
description: This API uses OAuth2 with authorizationCode grant flow.
flows:
authorizationCode:
authorizationUrl: https://example.b2clogin.com/example.onmicrosoft.com/B2C_1_SignUpAndSignIn/oauth2/v2.0/authorize
tokenUrl: https://example.b2clogin.com/example.onmicrosoft.com/B2C_1_SignUpAndSignIn/oauth2/v2.0/token
scopes:
example.read: read
example.write: write
schemas:
Job:
type: object
required:
- title
- category
- teleworkingDays
description: Job information
properties:
id:
type: integer
format: int64
title:
type: string
security:
- AzureOAuth:
- example.read
- example.write
I'm using oauth2 according to Azure's documentation.
Here is the post executed by the generated service.
Notice that the Bearer is empty.
I'm also wondering, if it's the correct way to do, because here I'm implementing it with the oauth2 way, but as I already have an access token in my localstorage, shouldn't just go with the bearer implementation ?
Also, testing with postman works completely fine, so I assume the controller part is fine.
Thank you
I have a page that clients can upload their csv files, save it to the server, then ajax will pass the location of the csv.
Question is I can't find a way for zingchart to reload with a new csv url, tried many ways in the document, below is my uncomplete code, don't know if there is any method in zingchart.exec can achieve this. Thanks for any suggestions or help
$.ajax({
type: 'POST',
url: '/upload_csv',
data: form_data,
contentType: false,
cache: false,
processData: false,
success: function(data) {
zingchart.exec('chartjs-line', 'modifyplot', {
data:{
csv: {
url: data.csv_url,
verticalLabels: true,
}
};
}
});
});
You should be able to do this with the modify function, the same way you have it set up currently. modifyplot targets the plot object within your graph object; csv should be a member of your graph object.
If you have any other issues, the fastest way to get support is emailing support#zingsoft.com or starting a chat with us on our site!
I build an authentication method in Node which use Azure AD. I use h here fore the "javascript quickstart" template which Microsoft offers. The Goal is that the user(s) start with the login screen. When they successful authenticate with Azure AD then they will redirect to the landing page.
All works accept loading the landing page(index.jade).The user is still on the same page after authentication.
Below code which is responsible to render the (or redirect) the landing page
exports.login = function(req, res){
console.info('Check on User')
var user = req.body.user
if(user){
console.info('user exist')
console.info(user)
console.info('now render the index page jade')
//res.render('../views/index')
res.redirect('../views/index')
}
The location of the index file is "{projectlocation}/views/index.jade" The folder location where the redirect/render take place is "{projectlocation}/routes/login.js".
Below output of the code:
Check on User
user exist
{
'#odata.context': 'https://graph.microsoft.com/v1.0/$metadata#users/$entity',
displayName: 'username',
givenName: 'user',
jobTitle: '',
mail: 'user#user.com',
mobilePhone: '',
officeLocation: '',
preferredLanguage: 'nl-NL',
surname: 'user',
userPrincipalName: 'user#user.nl',
id: '666666-bbb-4444-5555-8tt874yy60oo'
}
now render the index page jade
POST /Aanmelden 200 239.783 ms - -
GET /views/index 404 0.829 ms - 31
I also try base on the comments to change the res.render to res.redirect
see the below code. Now i get some more output but still not the desire result.
{ errors:
[ { domain: 'global',
reason: 'required',
message: 'Missing required field: member' } ],
code: 400,
message: 'Missing required field: member' }
I get this error when I run the following request:
var request = client.admin.members.insert({
groupKey: "some_group#example.com"
, email: "me#example.com"
});
I was authenticated successfully (I received the access token and so on) but when I execute the request above it callbacks that error.
What member field am I supposed to add?
It works fine in API Explorer using groupKey and email fields.
The documentation at https://developers.google.com/admin-sdk/directory/v1/reference/members/insert for admin.members.insert indicates that it requires a groupKey parameter, but that the body (which the node.js library handles as a separate object) should contain a members object containing the role property. See the API Explorer a the bottom of that page as well.
email is part of the form data. The form data must be passed as object in the second argument:
// create the group insert request
var request = client.admin.members.insert({
groupKey: "some_group#example.com"
}, {
email: "me#example.com"
});