backpack for laravel not updating rows, it's using POST instead of UPDATE - crud

I have a project and I have installed backpack for laravel, works well except when I need to update any data, getting always this error 'The POST method is not supported for this route. Supported methods: PUT, DELETE.'

Related

Parameter not allowed for this message type: code_challenge_method, how to fix it in nuxt?

in Nuxt I have the title error using auth v5. This is my current strategy:
The docs (https://dev.auth.nuxtjs.org/schemes/oauth2#codechallengemethod) says that you can use "plain" or "S256" as an option, I tried both but the error persists.
The only I cant manually get it work is by copy-pasting the oAuth in the url:
https://accounts.google.com/o/oauth2/auth/identifier?protocol=oauth2&response_type=token&client_id=MYCLIENTID&redirect_uri=https%3A%2F%2Flocalhost%3A3005%2Flogin&scope=profile%20email&state=sIpW-W_6h_QwUs0gCDV_o&flowName=GeneralOAuthFlow
Compare that link to the following:
https://accounts.google.com/o/oauth2/auth/identifier?protocol=oauth2&response_type=token&client_id=MYCLIENTID&redirect_uri=https%3A%2F%2Flocalhost%3A3005%2Flogin&scope=profile%20email&state=sIpW-W_6h_QwUs0gCDV_o&code_challenge_method=S256&code_challenge=fnyp2Ray850HEmHEwmoyQtIrPFPpHWBt4nVAz9p5Vxs&flowName=GeneralOAuthFlow
The only difference between the first and second link is that the first one actually works (I can login) and it doesn't have a challenge_method.
The second link doesn't work (it displays the google image above) but if you read the end of the link it has both the code_challenge_method & code_challenge
After many hours of trial and error, the only way to make it work is by setting code_challenge_method to an empty string, like this:
The demo used in the nuxt auth module, does the same thing, they don't use any code_challenge_method with the google strategy
EDIT 10/06/2021
After doing further investigation, it seems that if I only use an empty code_challenge_method (just like the image above), google auth just doesn't seem to work anymore, my bet is that a broken commit was merged here, so in order to fix it I added a new property to my google strategy:
responseType: 'token id_token'
I also created a report for that bug here
I had the same error and this setup has fixed my issues. Note I am using Next-auth but the parameter name is the same except for the naming convention. Set response_type value to code. Setting the response_type value to token will issue an error, so use code instead.

Do I need to migrate an action to v2 that doesn't use Dialogflow?

Google sent me a reminder to migrate from Dialogflow API v1 to v2. I don't use Dialogflow. The skill is connected to custom Python code on our own servers. Our code gets JSON and returns JSON. Should I be concerned?
What you've described still could be using Dialogflow, since Actions using Dialogflow can also be written in Python and receive JSON.
Some things that might be indicators:
If you have an actions.json file, and deploy this when you update your Action, you are probably not using Dialogflow.
If the JSON you receive contains an attribute "result" or "originalRequest" (or both), then you're using Dialogflow's fulfillment webhook protocol.
If you're looking at inputs[0].intent to see what Intent was triggered, and the value either matches one in your actions.json or a string such as actions.intent.TEXT, then you're using the Actions SDK and not Dialogflow.
If you were looking at result.metadata.intentName to get the name of the Intent, then you're using Dialogflow.
If you are using Dialogflow, you need to move to v2, which will require some changes in the names of several of the JSON fields. https://dialogflow.com/docs/reference/v1-v2-migration-guide-fulfillment#webhook_request_and_response_json (and sections further down on the page) provide information on the changes and what you'll need to do.
Yes! you should be concerned, I have faced the same issue as JSON has been changed for somethings already.

fulCalendar 4 / superagent: how to send http-headers

I'm using the latest version of fullcalender 4 in an angular 7 project. Fullcalendar 3 used ajax to request json feeds for the events, but version 4 relies on SuperAgent, so a lot of commands were renamed or removed. One of them being "headers: {}". Since its not a public Calendar, i need to send a jwt token, but i cant find a smart way to do that, besides adding it to the request url. Is the headers feature just renamed and i dont find the docs to use it, especially since SuperAgent makes sending headers super easy, or is it not supported (yet)?

Jira V6.0+ creating a project over REST API

I've got a problem: I'm working on an external webinterface for my company and we use Atlassians JIRA as a project issue and tracking method. I am trying to connect our webinterface over the REST API. After a short research I found out, that Atlassian never implemented the possibility to create a new JIRA Project over their REST API. Well, that isn't that true, they've implemented it in the actual version (7.0) because they migrated their other two APIs to one REST API. Now comes my problem: We are currently unable to upgrade from version 6.4.4 to version 7.0.0. After a second search I found a workaround for this problem. You can find it here:
The real problem is that this workaround isn't working or I'm doing it wrong.
I've already tried it with a GET request and the given arguments as parameters and over the normal POST method with a JSON body in it.
What's my problem?
Here some more informations: When I try it over GET, I always receive the normal response for the URL (it returns a list with all available templates). When I try it over POST with a JSON body (this is by the way the normal method for the normal functions of the REST API) I get back a HTTP-Error 415 Unsupported media type.
it would be nice if someone could test this workaround with a 6.0+ version of JIRA
So after some months I got it by myself. You have to make a POST request with the following header fields:
Content-Type=application/x-www-form-urlencoded; charset=UTF-8
Authorization=Basic {set your credentials as a Base64-String: "user:password"}
X-Atlassian-Token=nocheck
Once done you can set your POST-Parameters to the following:
name=Name of the Project
key=Key of the Project
lead=Leader of the Project
keyEdited=true (don't change it!)
projectTemplateWebItemKey=com.atlassian.jira-legacy-project-templates:jira-blank-item (don't change it!)
projectTemplateModuleKey=com.atlassian.jira-legacy-project-templates:jira-blank-item (don't change it!)
Hope that this helps someone, Jira is just weird in some cases :/

How to get a git tag message from the Github API

I'm trying to get tag messages from the Github API. It says here I'm supposed to use this URL:
https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac
But I get "Not found" there, even if I try my own repo:
https://api.github.com/repos/richbrat/testrepo/git/tags/6cec7db2ae2d0213644480ba58bcc4a277ae8a2b
I'm using the node-github package with an oauth token and it's working really well for the "repos" calls but "gitdata" doesn't seem to work. Checking the headers I get back gives me a hint though:
... "x-oauth-scopes":"user, public_repo, repo, gist","x-accepted-oauth-scopes":"repo" ...
Gitdata seems to be outside my scope. Is it possible to get it into my scope or is there another solution to get tag messages?