rimecms 0.25.4 → 0.25.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,8 +32,9 @@ export const processFileUpload = Hooks.beforeUpsert(async (args) => {
32
32
  const hasSizeConfig = 'imageSizes' in config.upload && Array.isArray(config.upload.imageSizes);
33
33
  const sizesConfig = hasSizeConfig ? config.upload.imageSizes : [];
34
34
  if (data.file) {
35
- if (operation === 'update' && args.context.originalDoc)
35
+ if (operation === 'update' && args.context.originalDoc) {
36
36
  await cleanupStoredFiles({ config, rime, id: args.context.originalDoc.id });
37
+ }
37
38
  const { filename, imageSizes } = await saveFile(data.file, sizesConfig);
38
39
  data = {
39
40
  ...omit(['file'], data),
@@ -44,8 +45,9 @@ export const processFileUpload = Hooks.beforeUpsert(async (args) => {
44
45
  // If data.file is explicitly set to null : delete file
45
46
  if (data.file === null) {
46
47
  // delete files
47
- if (operation === 'update' && args.context.originalDoc)
48
+ if (operation === 'update' && args.context.originalDoc) {
48
49
  await cleanupStoredFiles({ config, rime, id: args.context.originalDoc.id });
50
+ }
49
51
  // update data for DB update
50
52
  for (const size of sizesConfig) {
51
53
  data = {
@@ -25,8 +25,7 @@
25
25
  });
26
26
 
27
27
  async function sendPasswordResetLink() {
28
- // @ts-expect-error better-auth type issue to resolve
29
- const { data, error } = await authClient.forgetPassword({
28
+ const { data, error } = await authClient.requestPasswordReset({
30
29
  email: form.values.email,
31
30
  redirectTo: `/reset-password?slug=staff`
32
31
  });
@@ -27,14 +27,14 @@
27
27
  });
28
28
 
29
29
  async function sendResetPasswordMail() {
30
- // @ts-expect-error better-auth type issue to resolve
31
- const { data, error } = await authClient.forgetPassword({
30
+ const { data, error } = await authClient.requestPasswordReset({
32
31
  email: context.values.email,
33
32
  redirectTo: `/reset-password`
34
33
  });
35
34
  if (error && error.message) {
36
35
  toast.error(error.message);
37
36
  }
37
+ console.log(data);
38
38
  if (data && data.status) {
39
39
  success = data.status;
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimecms",
3
- "version": "0.25.4",
3
+ "version": "0.25.5",
4
4
  "homepage": "https://github.com/bienbiendev/rime",
5
5
  "scripts": {
6
6
  "dev": "vite dev",