feat: rebrand Hemmelig to paste.es for cloudhost.es
- Set Spanish as default language with ephemeral/encrypted privacy focus - Translate all user-facing strings and legal pages to Spanish - Replace Norwegian flag with Spanish flag in footer - Remove Hemmelig/terces.cloud links, add cloudhost.es sponsorship - Rewrite PrivacyPage: zero data collection, ephemeral design emphasis - Rewrite TermsPage: Spanish law, RGPD, paste.es/CloudHost.es references - Update PWA manifest, HTML meta tags, package.json branding - Rename webhook headers to X-Paste-Event / X-Paste-Signature - Update API docs title and contact to paste.es / cloudhost.es Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
35
scripts/admin.ts
Normal file
35
scripts/admin.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import db from '../api/lib/db';
|
||||
|
||||
async function main() {
|
||||
const email = process.argv[2];
|
||||
|
||||
if (!email) {
|
||||
console.error('Please provide an email address.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
const user = await db.user.findUnique({
|
||||
where: { email },
|
||||
});
|
||||
|
||||
if (!user) {
|
||||
console.error(`User with email "${email}" not found.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
await db.user.update({
|
||||
where: { email },
|
||||
data: { role: 'admin' },
|
||||
});
|
||||
|
||||
console.log(`User "${email}" has been granted admin privileges.`);
|
||||
} catch (error) {
|
||||
console.error('An error occurred:', error);
|
||||
process.exit(1);
|
||||
} finally {
|
||||
await db.$disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user