khzg / littlelink-admin

Littlelink admin is an admin panel for littlelink that provides you a website similar linktree.
GNU Affero General Public License v3.0
92 stars 17 forks source link

If user use the same page name it gives error #10

Closed Ruriko closed 3 years ago

Ruriko commented 3 years ago

If user use a duplicated page name it gives error:

Illuminate\Database\QueryException
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Something' for key 'users_littlelink_name_unique' (SQL: update `users` set `littlelink_name` = Something, `littlelink_description` = ?, `users`.`updated_at` = 2021-11-17 10:48:30 where `id` = 2)

How to fix this?

khzg commented 3 years ago

Be unique when validating, also in migration and database.

On Wed, Nov 17, 2021, 14:19 Ruriko @.***> wrote:

If user use a duplicated page name it gives error:

Illuminate\Database\QueryException SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'Something' for key 'users_littlelink_name_unique' (SQL: update users set littlelink_name = Something, littlelink_description = ?, users.updated_at = 2021-11-17 10:48:30 where id = 2)

How to fix this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/khashayarzavosh/littlelink-admin/issues/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLZJK3F22SGTL2PJY732Y3UMOCEDANCNFSM5IGTLFIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.