Skip to content

fix: update deprecated deleteSession usage in Next.js tutorial#2803

Open
NairAlina wants to merge 2 commits intoappwrite:mainfrom
NairAlina:NairAlina-patch-1
Open

fix: update deprecated deleteSession usage in Next.js tutorial#2803
NairAlina wants to merge 2 commits intoappwrite:mainfrom
NairAlina:NairAlina-patch-1

Conversation

@NairAlina
Copy link
Copy Markdown

@NairAlina NairAlina commented Mar 15, 2026

What does this PR do?

Updates the deprecated usage of account.deleteSession('current') in the Next.js tutorial.
The Appwrite SDK now expects an object parameter, so the code has been updated to:
account.deleteSession({ sessionId: 'current' })

This ensures the tutorial follows the current SDK syntax and prevents confusion for developers following the guide.

Test Plan

Verified the change by checking the current Appwrite SDK documentation and confirming that deleteSession expects an object parameter.

Related PRs and Issues

Closes #2489

Have you read the Contributing Guidelines on issues?

Yes, I have read the contributing guidelines.

Summary by CodeRabbit

  • Documentation
    • Updated Next.js tutorial documentation (step 4) to reflect the current logout flow implementation.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1c61dd94-5991-4918-8b27-8748d87010d2

📥 Commits

Reviewing files that changed from the base of the PR and between 1f85115 and 6df0940.

📒 Files selected for processing (1)
  • src/routes/docs/tutorials/nextjs/step-4/+page.markdoc

Walkthrough

The change updates a documentation file for a Next.js tutorial step. The logout flow example is modified to invoke account.deleteSession with an object parameter { sessionId: 'current' } instead of passing a plain string 'current'. Additionally, two trailing newlines are added to the file for formatting consistency.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating deprecated deleteSession usage in the Next.js tutorial to match current SDK syntax.
Linked Issues check ✅ Passed The PR successfully addresses issue #2489 by updating account.deleteSession('current') to account.deleteSession({ sessionId: 'current' }) as requested.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the deprecated deleteSession usage in the Next.js tutorial as specified in issue #2489; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation: Deprecated method in Tutorials/nextjs/step-4

1 participant