You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a look at the code you wrote for this and am listing things that could be improved here as an overview :)
Backend
I think it would be good to introduce PHP-Code-Sniffer, so that the repo uses the canonical Nextcloud coding style. The corresponding CI action is already installed, the only thing it now needs is a composer.json file containing the command and the dependency
The CI workflows also contain a REUSE workflow that is currently failing. It would be good to fix the issues mentioned in the action run here
PromptMapper#createPrompt: The way the mapper classes are usually used is to create the model object (ie. Prompt) outside of the mapper class and then pass it to update/insert methods. You can then also update the timestamp by overriding the insert/update methods setting the new timestamp on the model and then calling parent::insert($prompt) https://github.com/nextcloud/gptfreeprompt/blob/main/lib/Db/PromptMapper.php#L115-L138
Hey @MB-Finski
I had a look at the code you wrote for this and am listing things that could be improved here as an overview :)
Backend
Prompt) outside of the mapper class and then pass it to update/insert methods. You can then also update the timestamp by overriding the insert/update methods setting the new timestamp on the model and then calling parent::insert($prompt) https://github.com/nextcloud/gptfreeprompt/blob/main/lib/Db/PromptMapper.php#L115-L138Frontend
Other
Other than these the app looks already quite nice! Nice job!
Marcel