fix: psalm issue

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
Vitor Mattos 2025-08-20 00:18:33 -03:00
parent 27d43191b9
commit af61cbc07e
No known key found for this signature in database
GPG key ID: 6FECE2AD4809003A
5 changed files with 8 additions and 8 deletions

View file

@ -71,7 +71,7 @@ class SignatureElementsController extends AEnvironmentAwareController implements
#[NoAdminRequired]
#[NoCSRFRequired]
#[PublicPage]
#[RequestHeader(name: 'LibreSign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[ApiRoute(verb: 'POST', url: '/api/{apiVersion}/signature/elements', requirements: ['apiVersion' => '(v1)'])]
public function createSignatureElement(array $elements): DataResponse {
@ -120,7 +120,7 @@ class SignatureElementsController extends AEnvironmentAwareController implements
#[NoAdminRequired]
#[NoCSRFRequired]
#[PublicPage]
#[RequestHeader(name: 'LibreSign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequestHeader(name: 'libresign-sign-request-uuid', description: 'The UUID of the sign request, used to identify the request', indirect: true)]
#[RequireSignRequestUuid(skipIfAuthenticated: true)]
#[ApiRoute(verb: 'GET', url: '/api/{apiVersion}/signature/elements', requirements: ['apiVersion' => '(v1)'])]
public function getSignatureElements(): DataResponse {

View file

@ -153,7 +153,7 @@ class InjectionMiddleware extends Middleware {
}
private function getUuidFromRequest(): ?string {
return $this->request->getParam('uuid', $this->request->getHeader('LibreSign-sign-request-uuid'));
return $this->request->getParam('uuid', $this->request->getHeader('libresign-sign-request-uuid'));
}
private function getLoggedIn(): void {

View file

@ -70,7 +70,7 @@ export default {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)

View file

@ -54,7 +54,7 @@ export const useSignatureElementsStore = function(...args) {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)
@ -98,7 +98,7 @@ export const useSignatureElementsStore = function(...args) {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)
@ -128,7 +128,7 @@ export const useSignatureElementsStore = function(...args) {
}
if (this.signRequestUuid !== '') {
config.headers = {
'LibreSign-sign-request-uuid': this.signRequestUuid,
'libresign-sign-request-uuid': this.signRequestUuid,
}
}
await axios(config)

View file

@ -223,7 +223,7 @@ Feature: account/signature
When as user ""
And I open the latest email to "signer@test.coop" with subject "LibreSign: There is a file for you to sign"
And I fetch the signer UUID from opened email
And set the custom http header "LibreSign-sign-request-uuid" with "<SIGN_UUID>" as value to next request
And set the custom http header "libresign-sign-request-uuid" with "<SIGN_UUID>" as value to next request
When sending "post" to ocs "/apps/libresign/api/v1/signature/elements"
| elements | [{"type":"signature","file":{"base64":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}}] |
Then the response should have a status code 200